Jair Posted April 30, 2019 Share Posted April 30, 2019 Thanks, I'll check it out. Haven't seen the pause screen come up in Big Box yet, how does that work? Quote Link to comment Share on other sites More sharing options...
Retro808 Posted April 30, 2019 Share Posted April 30, 2019 15 minutes ago, Jair said: Thanks, I'll check it out. Haven't seen the pause screen come up in Big Box yet, how does that work? You have to go into BigBox settings and set the key/button you want to trigger the pause screen. Look in the Automation options. It is also currently only available in the beta version. Quote Link to comment Share on other sites More sharing options...
jayjay Posted June 14, 2019 Share Posted June 14, 2019 (edited) Can we not interact with pause menu user controls like we can with BB user controls? Ohh my user control loads and unloads on pause and resume. Iv lost my hard on. Edited June 14, 2019 by jayjay Quote Link to comment Share on other sites More sharing options...
viking Posted July 22, 2019 Share Posted July 22, 2019 (edited) Hi everybody ! Me again with a question ? Is it possible to create a separate XAML file, placed at the root of the theme folder, which contains different hex color codes for each platform? For example : In the separated XAML, call (for exemple) "Colorful.xaml" , something like : if platform is "Nintendo Game Boy" > custom color="#ffffff" if platform is "Nintendo Game Boy Advence" > custom color="#454fd2" if platform is "Nintendo Game Boy Color" > custom color="#754d8s" ... and so on In main Game or Plarform view, used this color , like : <TextBlock Text="My Text here" Foreground="{Binding Hex Color Code, depending active platform}" /> I want the XAML code to be separated into an external file, because that makes only one list of platform/color to maintain! Ideas ? Tracks ? @Jason Carr and all code guru ? ? Edit : and a default color ! If no Platform specified. Edited July 22, 2019 by viking Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted July 22, 2019 Author Share Posted July 22, 2019 4 hours ago, viking said: Hi everybody ! Me again with a question ? Is it possible to create a separate XAML file, placed at the root of the theme folder, which contains different hex color codes for each platform? For example : In the separated XAML, call (for exemple) "Colorful.xaml" , something like : if platform is "Nintendo Game Boy" > custom color="#ffffff" if platform is "Nintendo Game Boy Advence" > custom color="#454fd2" if platform is "Nintendo Game Boy Color" > custom color="#754d8s" ... and so on In main Game or Plarform view, used this color , like : <TextBlock Text="My Text here" Foreground="{Binding Hex Color Code, depending active platform}" /> I want the XAML code to be separated into an external file, because that makes only one list of platform/color to maintain! Ideas ? Tracks ? @Jason Carr and all code guru ? ? I think it is possible, but honestly I'm no longer the greatest XAML guru around here. It would probably take me a couple of hours to figure it out, all considering. I know @eatkinola has done some pretty advanced stuff like this in the past. 1 Quote Link to comment Share on other sites More sharing options...
eatkinola Posted July 22, 2019 Share Posted July 22, 2019 (edited) 4 hours ago, Jason Carr said: I want the XAML code to be separated into an external file, because that makes only one list of platform/color to maintain! Ideas ? Tracks ? Hey @viking looking forward to see what you're putting together. I'm pretty sure you'll need a converter to do this. Using data triggers would work, but it would lead to very messy repetitive xaml and not the clean centralized code you're trying to write. I cannot think of a clean, xaml-only way to do this (maybe someone else can). This example from stackoverflow looks promising; you can define stuff in an xaml resource file like you want. You would need to code a converter, however would be a pretty simple piece of code. https://stackoverflow.com/a/20280045 Then your xaml view file would say something like this: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://siteoforigin:,,,/Themes/VikingsCoolTheme/Views/Styles/Colorful.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources> <Canvas Name="Canvas"> ... <TextBlock Text="My colorful text" Foreground="{Binding ActivePlatform.Name, Converter={StaticResource PlatformColorConverter}}" /> ... </Canvas> </UserControl> Your xaml resource file Colorful.xaml would look something like this: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:colorful="clr-namespace:Viking.Colorful;assembly=Viking.Colorful"> ... <colorful:PlatformColorConverter x:Key="PlatformColorConverter" /> ... <SolidColorBrush x:Key="Color_Atari 2600" Color="Red" /> <SolidColorBrush x:Key="Color_Atari 5200" Color="Blue" /> ... </ResourceDictionary> You would place the Viking.Colorful.dll (which defines the converter) in the theme's Plugins directory. I've not tested any of this and might have made some typos, but something like it should work. P.s. The stackoverflow solution will need some tweaking since you won't be adding your color definitions to the App.xaml but rather a separate xaml file. You'd have to reference that xaml file specifically, but I'm sure it could be done. Edited July 22, 2019 by eatkinola one more thing 1 1 Quote Link to comment Share on other sites More sharing options...
viking Posted July 24, 2019 Share Posted July 24, 2019 (edited) @eatkinola Man ! that's an answer! !! Thx ? OK, I will try to play and adapt all that. But ... I am totally noob in code, for the converter plugin itself. It's OK for XAML part, but I don't have any clue for the plugin. Basically, I work in die and retry style ! Do you have a link to a tutorial "step-by-step" on creating a plugin? I dont find anything online. (Source file format? Code format? How to export to DLL? ...) Edited July 24, 2019 by viking 1 Quote Link to comment Share on other sites More sharing options...
eatkinola Posted July 24, 2019 Share Posted July 24, 2019 7 hours ago, viking said: @eatkinola Man ! that's an answer! !! Thx ? OK, I will try to play and adapt all that. But ... I am totally noob in code, for the converter plugin itself. It's OK for XAML part, but I don't have any clue for the plugin. Basically, I work in die and retry style ! Do you have a link to a tutorial "step-by-step" on creating a plugin? I dont find anything online. (Source file format? Code format? How to export to DLL? ...) I can write the code for you. If you don't mind, I'll integrate it with my themer library and you can use it from there. The library already has some logic for handling platforms with different naming conventions, e.g., some users prefer "Nintendo Entertainment System" while others prefer "Nintendo NES". I have a way to insulate from these differences. I'll pm you. Quote Link to comment Share on other sites More sharing options...
viking Posted July 24, 2019 Share Posted July 24, 2019 (edited) If you want, but I want to learn !I I'll try first by myself ? Edit : and it must have a default color. If Platform syntaxe have a problem. Edited July 24, 2019 by viking 1 Quote Link to comment Share on other sites More sharing options...
eatkinola Posted July 24, 2019 Share Posted July 24, 2019 1 minute ago, viking said: If you want, but I want to learn !I I'll try first by myself ? Awesome! I also practice the "die and retry" style. It's the best way to learn. Quote Link to comment Share on other sites More sharing options...
soqueroeu Posted July 29, 2019 Share Posted July 29, 2019 CityHunter is my favorite theme. I would like to change the font Streamster for Lazer84 Someone could help me do that. Appreciate! Quote Link to comment Share on other sites More sharing options...
Mr. RetroLust Posted August 19, 2019 Share Posted August 19, 2019 Anyone know how to force 12 or 24 hour clock with 'CurrentTime' code or is it bound to ones language settings? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 19, 2019 Share Posted August 19, 2019 string Time = DateTime.Now.ToString("h:mm tt"); 7:46 AM string Time = DateTime.Now.ToString("HH:mm"); 07:46 1 Quote Link to comment Share on other sites More sharing options...
Mr. RetroLust Posted August 19, 2019 Share Posted August 19, 2019 4 minutes ago, JoeViking245 said: string Time = DateTime.Now.ToString("h:mm tt"); 7:46 AM string Time = DateTime.Now.ToString("HH:mm"); 07:46 Thanks for your response, where in the line should I put this string? This is the line; <TextBlock Text="{Binding CurrentTime}" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/NeonDeluxeArcade/Beon.ttf#Beon" Foreground="#A8FFF3" TextAlignment="Right" FontSize="40" TextWrapping="Wrap"> Quote Link to comment Share on other sites More sharing options...
y2guru Posted August 19, 2019 Share Posted August 19, 2019 You cannot use that code as he provided C#, you need a pure XAML solution 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 19, 2019 Share Posted August 19, 2019 Oh snap! lol. Umm... might try: <TextBlock Text=DateTime.Now.ToString("h:mm tt") FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/NeonDeluxeArcade/Beon.ttf#Beon" Foreground="#A8FFF3" TextAlignment="Right" FontSize="40" TextWrapping="Wrap"> The code is for C# which is what Jason's code is written. May also pass to Theme xmal codes. 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 19, 2019 Share Posted August 19, 2019 2 minutes ago, y2guru said: cannot use that code Oops. Quote Link to comment Share on other sites More sharing options...
Mr. RetroLust Posted August 19, 2019 Share Posted August 19, 2019 Lol thanks anyway, I noticed setting my language to Netherlands it will display 24 hours but I dont like software displaying in my native language, do you english speaking people hate 24 hour clocks or are you used to them? Quote Link to comment Share on other sites More sharing options...
neil9000 Posted August 19, 2019 Share Posted August 19, 2019 3 minutes ago, Mr. RetroLust said: Lol thanks anyway, I noticed setting my language to Netherlands it will display 24 hours but I dont like software displaying in my native language, do you english speaking people hate 24 hour clocks or are you used to them? Fine by me. 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 19, 2019 Share Posted August 19, 2019 <TextBlock Text="{Binding Date, StringFormat=h:mm tt}" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/NeonDeluxeArcade/Beon.ttf#Beon" Foreground="#A8FFF3" TextAlignment="Right" FontSize="40" TextWrapping="Wrap"> This Yankee prefers 12hr AM/PM. ? 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.