r22638 : New turn emphasis in game log
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
r22638 : New turn emphasis in game log
by spr » 21 Jul 2013, 01:35
Hi,
This is a small change to the Game Log which emphasizes when a new turn begins (see pic below) which perhaps does not warrant its own announcement but I just wanted to mention an accompanying modification to the way FSkin.GetFont() works.
Currently, FSkin.getFont() returns the default themed font with a point size of 1 which is very, very tiny and unreadable. Consequently, throughout the source code you will find whenever the font needs to be set the required size is hard-coded using FSkin.getFont(12), FSkin.getFont(15), etc.
I have updated getFont() so that it returns the default font with a size as determined by
To be consistent I have also added similar methods for bold and italics styles. This means, you can now use FSkin.getFont(), FSkin.getFontBold() or FSkin.getFontItalics() without having to specify or guess what the "default" text size is and be guaranteed a readable font size.
Ideally, the base font size would be set by the theme and the code would either increment or decrement this value or use predefined sizes such as Header1, Header2, etc.
Finally, on a theme-related topic - can I humbly suggest that the excellent Journeyman theme http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8449&start=15#p111420 is added to the stock skins if it has not been done already.
Cheers,
Steve
This is a small change to the Game Log which emphasizes when a new turn begins (see pic below) which perhaps does not warrant its own announcement but I just wanted to mention an accompanying modification to the way FSkin.GetFont() works.
Currently, FSkin.getFont() returns the default themed font with a point size of 1 which is very, very tiny and unreadable. Consequently, throughout the source code you will find whenever the font needs to be set the required size is hard-coded using FSkin.getFont(12), FSkin.getFont(15), etc.
I have updated getFont() so that it returns the default font with a size as determined by
- Code: Select all
UIManager.getDefaults().getFont("Label.font")
To be consistent I have also added similar methods for bold and italics styles. This means, you can now use FSkin.getFont(), FSkin.getFontBold() or FSkin.getFontItalics() without having to specify or guess what the "default" text size is and be guaranteed a readable font size.
Ideally, the base font size would be set by the theme and the code would either increment or decrement this value or use predefined sizes such as Header1, Header2, etc.
Finally, on a theme-related topic - can I humbly suggest that the excellent Journeyman theme http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=8449&start=15#p111420 is added to the stock skins if it has not been done already.
Cheers,
Steve
Re: r22638 : New turn emphasis in game log
by moomarc » 21 Jul 2013, 14:17
Thanks Steve! Looks great. Always good to have someone on the team that knows what they're doing with the UI.
With regards to the Journeyman theme, I'd say go ahead. I've been considering it for a few days now. Only reason I didn't add it initially when I created it was because Myk was looking into making the skins downloadable from within Forge. But he got busy in real life before that project materialized, so I never moved any themes to the cardforge servers.
With regards to the Journeyman theme, I'd say go ahead. I've been considering it for a few days now. Only reason I didn't add it initially when I created it was because Myk was looking into making the skins downloadable from within Forge. But he got busy in real life before that project materialized, so I never moved any themes to the cardforge servers.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: r22638 : New turn emphasis in game log
by spr » 28 Jul 2013, 22:25
re: r22685
Marc, don't forget to mention your new theme in CHANGES.TXT!
Cheers,
Steve.
Marc, don't forget to mention your new theme in CHANGES.TXT!
Cheers,
Steve.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 13 guests