Jump to content
LaunchBox Community Forums

Jason Carr

Administrators
  • Content Count

    8,847
  • Joined

  • Last visited

  • Days Won

    188

Everything posted by Jason Carr

  1. Hello all, my latest goal was to figure out a solution for theme developers for all three types of themes to be able to include custom fonts without having to create a custom plugin/DLL or requiring the end user to manually install them. Microsoft really made it way more of a pain than it should have been, so I was struggling with it for hours, but I finally have a good solution. Unfortunately it did require changes to the LaunchBox codebase, so this solution will only work going forward, for LaunchBox/Big Box 9.6-beta-7 and later. Previously it was not possible to automatically include custom fonts in startup themes, as plugins are not currently supported. This solution will allow you to use custom fonts in startup themes without requiring the user to manually install them, and this solution can be used for LaunchBox and Big Box themes as well (it's also now the recommended method). Here's an example of a TextBlock with a custom font: <TextBlock FontFamily="LAUNCHBOX_ROOT_FOLDER/Startup Themes/ExampleTheme/Blazed.ttf#Blazed" /> Obviously, only the FontFamily property is important here. It always starts with "LAUNCHBOX_ROOT_FOLDER", as LaunchBox and Big Box will automatically replace this with the LaunchBox folder, wherever it is located. This part was necessary because of Microsoft's bugs/security workarounds, none of which make sense, but it's impossible to load a font from a relative path in XAML without including it in a project or DLL, so LaunchBox just replaces this part with the full path to the LaunchBox folder. In the above case, the "LaunchBox\Startup Themes\ExampleTheme\Blazed.ttf" font will be used for that TextBlock element. Note the "#Blazed" portion at the end however; unfortunately you also have to include the pound sign, followed by the name of the font. You can find the name of the font by simply double-clicking the font file in Windows, and the name of the font will be displayed at the top of the Font Viewer application, next to "Font name:". I'm not sure why this is necessary, but it's another requirement in order to get the fonts working properly. Next, let's take a look at an example with a space in the font file and/or the font name: <TextBlock FontFamily="LAUNCHBOX_ROOT_FOLDER/Startup Themes/ExampleTheme/Hearty Script.ttf#Hearty Script" /> Simply putting it in as expected with spaces does work, so that should not be a concern. Let me know if anyone runs into any issues. I will say that I did find one font that just refused to work with WPF period, so if you can't seem to make it work, do try another font. Unfortunately it seems there are some fonts out there that are either just poorly made or incompatible with WPF for one reason or another. Thanks again all. Calling you all out here so that everyone is aware of this new feature. @faeran @Mr. RetroLust @RetroHumanoid @wallmachine @eatkinola @bbweiners @keltoigael @Jack. @y2guru @whoozwah @SNAK3ATER @Rincewind @CriticalCid @shro2016 @broskiplays @Grila @NJDave71 @Hexxxer @PhillsDoodles @Zombeaver @Omen @Cookz718 @viking @OrochiMishima @nosh @ea4492 @Maddoc1007 @vsilvalopes @damageinc86 @walter10h @skainlurmis @Scottad @Nyny77 @Sithel @Akezhar @Thanos Reigns
  2. The new form to upload LaunchBox, Big Box, and Startup themes to be included in the new themes manager is now available here: https://www.launchbox-app.com/themes You'll need to be logged in to the forums before clicking that link, or you'll be prompted to log in first. As stated on the submission page, here are the rules for theme submissions: Themes must be completely stable and not cause any stability issues Themes must work out of the box and not require any additional installation steps Themes must not be missing important features for usability (such as missing a button to show the main menu in LaunchBox themes) Themes must not be missing required views (such as the game details view for Big Box themes) Themes must be developed by yourself and must be significantly different from other themes Sufficient screenshots of the theme are required (including all relevant views for Big Box themes) The submission process should be straightforward, but it will take some time as you'll need screenshots for each view that your theme uses (for Big Box themes at least). The new screenshot functionality that is available in the latest beta of Big Box should help with this; you can simply press the Print Screen key while you're in Big Box and screenshots will show up in the LaunchBox\Screenshots folder, named with the active theme and view so that it's easy to keep track of them all. Once you submit a theme, it will need to be approved by ETA Prime and I. I'll be focusing on testing and approving themes here before the 9.6 official release so that we can get as many themes up there as possible for the public release. Editing existing themes metadata and screenshots will not need approval, but any time a new theme zip file is uploaded, it will have to go through the approval process. If you are concerned with themes not being allowed to "require any additional installation steps", please note that DLLs should no longer require unblocking using the new themes manager, and we've also made it easier to get fonts working without installation or custom DLLs here: There may be a hitch or two yet with the custom font solution, but I'll make sure that everything is working with that before the official release. No issues have been identified and everything is working properly with the new custom font solution (updated 2019-03-20). Thank you all so very much for all the amazing themes. I'm calling you guys out one more time here so that everyone is aware that the theme uploader is available. Sorry for the multiple callouts as of late. @faeran @Mr. RetroLust @RetroHumanoid @wallmachine @eatkinola @bbweiners @keltoigael @Jack. @y2guru @whoozwah @SNAK3ATER @Rincewind @CriticalCid @shro2016 @broskiplays @Grila @NJDave71 @Hexxxer @PhillsDoodles @Zombeaver @Omen @Cookz718 @viking @OrochiMishima @nosh @ea4492 @Maddoc1007 @vsilvalopes @damageinc86 @walter10h @skainlurmis @Scottad @Nyny77 @Sithel @Akezhar @Thanos Reigns
  3. Jason Carr

    (Solved) Big Box PAINFULLY slow!

    Interesting. I run both Asus Aura and AI Suite III without issues (I always run Asus motherboards), so that's puzzling to me. But I'm glad you got it all squared away.
  4. FYI all, @faeran helped me identify an issue with the theme forms where submitting a version with two decimal points (2.4.5 for example) was causing a server-side error and not submitting the theme. The version number is stored as a normal decimal number, so version numbers cannot have multiple decimal points in them. However, I've put up a new version of the web form that simply removes any extra decimal points so as to not trip people up in the future. Let me know if anyone runs into any additional issues with the theme submission process. Thanks!
  5. Jason Carr

    Including Custom Fonts without Custom DLLs

    Just to clarify here for everyone in this thread, the new font solution above is working properly everywhere. @wallmachine's issue is an unrelated thing. @wallmachine After looking at your code, I'm guessing you'll probably need to set the all caps thing inside the ListBoxItemStyle instead of the ListBoxStyle, and you might need to put it deeper down into the template as well.
  6. Jason Carr

    Including Custom Fonts without Custom DLLs

    I see. So the uppercase thing is a separate issue than the font not loading. I was under the impression that the fonts were not loading as expected. At least we can cross that issue off the list. I'll do some quick research to see what might be going on with the uppercase thing.
  7. Per @jayjay's post above, BackgroundReloadSave is generally a good idea to use; the primary reason to use it is so that there are no conflicts with a third-party syncing app like Dropbox or Google Drive. Basically, it reloads any changed data from disk before saving the new values, just in case Dropbox or Google Drive happened to update a data file since the last time it was loaded. Regardless, though, either @jayjay's solution above or just PluginHelper.DataManager.Save() should both be working to save data that has been changed in games.
  8. Hi @SsjCosty, calling PluginHelper.DataManager.Save() should save any changes to games. Feel free to PM me your code and I can look through it to see what might be causing the issue.
  9. Jason Carr

    XAML Tips and Tricks

    Hey everybody, post your XAML tips and tricks to share with other theme creators here. For starters, here's how to add an image with a relative path: <Image Source="pack://siteoforigin:,,,/Themes/CleanHardware/img/white-corner.png" RenderOptions.BitmapScalingMode="HighQuality" /> Note that the "pack://siteoforigin:,,," is basically replaced with the LaunchBox folder path. Also note the forward slashes instead of backslashes. :)
  10. Jason Carr

    XAML Tips and Tricks

    @jayjay I'll add those OSK requests to my list. Focus is a funny thing in Big Box; generally I don't rely on focus at all, because all inputs happen globally to the app and Big Box just knows where to send them. My recommendation would be to use the OnEnter, OnEscape, OnUp, OnDown, OnLeft, OnRight, OnPageDown, and OnPageUp methods of the IBigBoxThemeElementPlugin interface to detect when inputs occur, and then use that info to change the selection without forcing focus on the control.
  11. Yes, it certainly could. My guess at this point is that it's considering something you're putting in as a security issue (it gets scared because of stuff like SQL injection attacks). You can always edit the description fields after the fact, so perhaps you can try putting in only something simple and then doing edits. That will also make it much easier to identify the problem field-by-field. So sorry for all the trouble here, but thanks for helping me troubleshoot this.
  12. There is, but it's stupid high (over a gig). You could try submitting without a video though to see if that's the issue. Then that would give me an easy lead to identify the problem. Also, does the error happen on submit? Or when uploading the video? Or somewhere else?
  13. Yes, that's good to see. It appears that it's not liking something that you're entering somewhere (or not entering), but it's proving difficult to figure out what exactly it is.
  14. Jason Carr

    (Solved) Big Box PAINFULLY slow!

    @gogoplata Unfortunately I've tested with your data and I'm not seeing any performance issues on my machines, so I'm guessing it's somehow system specific, or it's some kind of weird conflict with a running app. The next thing I would try is killing any and all processes that are running in the background via Task Manager, to see if there's a particular process that happens to be causing the issue. In the past, performance issues like this have often been the result of poorly written anti-virus software or similar.
  15. Are you getting validation error boxes to pop up if you don't fill in any fields and just click the submit button?
  16. Jason Carr

    Including Custom Fonts without Custom DLLs

    @y2guru It depends on whether you're creating a Startup Theme or a Big Box Theme. The different types of themes go into different folders.
  17. Jason Carr

    Including Custom Fonts without Custom DLLs

    I'm confused here as to what's wrong. First I tested putting the new font solution in a copy of the default theme, in the TextListView.xaml, and it shows up just fine with that font. Then I loaded up your theme and it appears to be working properly with the font and the new solution. What am I missing? As far as I can tell, everything is working properly.
  18. Can you try loading up the main themes page and then pressing Ctrl+F5 to force refresh everything?
  19. Yup, platform and playlist specific views in Big Box only apply to the games lists.
  20. Yes, custom fonts will require either a custom DLL as many themes have done previously, or the new easier solution. The two required views for Big Box themes are the text list views for both the platforms/filters and games. The main reason for this is that they are always used; filters other than platforms always use the text list filters view, and the game details menu always uses the text list games view. I don't see any issues with the theme editor/generator (in fact I'm very glad you're working on it). It's important for themes to be unique and hold value on their own, but from what I've seen of your app, it certainly seems flexible enough to allow for a whole bunch of very unique themes.
  21. Sorry for that; I figured out the issue. When I deployed the latest version, I forgot to include a javascript reference file for validation. It should be fixed now.
  22. Jason Carr

    Including Custom Fonts without Custom DLLs

    Thank you @wallmachine. Can you zip up and PM me the theme?
  23. Jason Carr

    Multi Images Startup Theme

    Yes, animated gifs are supported, though they do require special syntax. I know the syntax is here on the forums somewhere, but I'd have to search for it. You could certainly use XAML to load up a separate GIF image for each game.
  24. Jason Carr

    (Solved) Big Box PAINFULLY slow!

    @gogoplata I'm guessing it somehow has to do with the data in your collection. If you can please zip up and PM me your LaunchBox\Data folder, I'll take a look to see if I can figure out what's causing it. I assume you're running LaunchBox 9.5?
×