I'm looking for a plugin that allows the Dev to change the default font. My game features two distinct time periods and Iij would like the game font to reflect that in the menus.
I know how to change the default font in the .css file but I'm looking for a plugin that will direct the engine to a different .css file when prompted. Kind of like the windowskins plugin.
Thank you for the quick response! I won't be able to test this until tonight, but I have a question. Can I use the second code you provided in an evented script call, or does it have to be an actual plugin? I have no idea how to make a plugin.
It would be in a plugin, because it overwrites the default behavior of how the font is chosen.
Creating a plugin is like creating any other file on your computer. If you were to create a text file, you would create "my_text_file.txt". Well, a Javascript file is just a text file with a different file type. So create a file called "ChangeFontDuringGame.js" inside your project plugins folder (same place you have all the other plugins).
Open up this new file in any text editor (Notepad++ is a good one if you're a beginner) and paste the code in and then add the plugin in your Plugin Manager.
Please don't use the default Notepad on Windows because that'll destroy the formatting.
Awesome, thanks! I'll try that as soon as I'm done driving today.
Holy freaking crap!!!!! So I had 15 minutes to kill and I tried your code....It freaking worked! You're amazing, thank you so much. That was the last game mechanic I needed to figure out to move forward with my idea.