It is currently 10 May 2024, 11:31
   
Text Size

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

Postby 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
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

EventLogTurnEmphasis.png
User avatar
spr
 
Posts: 213
Joined: 06 Jul 2013, 19:31
Has thanked: 28 times
Been thanked: 60 times

Re: r22638 : New turn emphasis in game log

Postby 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.
-Marc
User avatar
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

Postby spr » 28 Jul 2013, 22:25

re: r22685

Marc, don't forget to mention your new theme in CHANGES.TXT!

Cheers,
Steve.
User avatar
spr
 
Posts: 213
Joined: 06 Jul 2013, 19:31
Has thanked: 28 times
Been thanked: 60 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 13 guests


Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 13 guests

Login Form