Maniac
Apolyton Sage
Hi all.
I have modified a little something in the MainInterface python file of the Planetfall mod.
A predecessor added this line among some other code, in order to show the Flowering Counter value on the main screen:
As, thanks to Shakiko, there is now a gamefont icon available to represent the Flowering Counter, I wanted to modify this line to add a symbol behind it.
I did it like this:
The txt string is:
Edit: Um, the forum automatically converts the symbol code &# 8706 ; in something wrong. But anyway, that's not the problem. The icon shows up fine and all that. No problem there. There is an unintended side-effect though. While previously the number showed up without anything else, now it shows up with a plus in front of it. I don't like that because:
1) The Flowering Counter can never go under zero anyway;
2) It takes up valuable interface space. I have plans to add another value to the left of the Flowering Counter. Looks like there may be some overlap with that plus present.
I've tried putting the flowering value between abs(), but the plus still stays.
So does anyone know how to get rid of that + ??
Thanks.
PS: What's the deal with those % btw (as in u"%d" % blah)? What are those for? Does that remove the plus? Can those be combined with a txt string? My attempts gave some errors.
I have modified a little something in the MainInterface python file of the Planetfall mod.
A predecessor added this line among some other code, in order to show the Flowering Counter value on the main screen:
Code:
screen.setLabel("PlanetValueLabel", "", u"<font=4>%d</font>" % gc.getGame().getPlanetValue(), CvUtil.FONT_RIGHT_JUSTIFY, 240, 5, 0, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_HELP_PLANET_VALUE, -1, -1)
As, thanks to Shakiko, there is now a gamefont icon available to represent the Flowering Counter, I wanted to modify this line to add a symbol behind it.
I did it like this:
Code:
screen.setLabel("PlanetValueLabel", "", u"<font=4>" + localText.getText("TXT_KEY_FLOWERING_COUNTER" , (gc.getGame().getPlanetValue(), )) + u"</font>", CvUtil.FONT_RIGHT_JUSTIFY, 240, 5, 0, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_HELP_PLANET_VALUE, -1, -1)
The txt string is:
Code:
<Tag>TXT_KEY_FLOWERING_COUNTER</Tag>
<English>%D1_Change∂</English>
Edit: Um, the forum automatically converts the symbol code &# 8706 ; in something wrong. But anyway, that's not the problem. The icon shows up fine and all that. No problem there. There is an unintended side-effect though. While previously the number showed up without anything else, now it shows up with a plus in front of it. I don't like that because:
1) The Flowering Counter can never go under zero anyway;
2) It takes up valuable interface space. I have plans to add another value to the left of the Flowering Counter. Looks like there may be some overlap with that plus present.
I've tried putting the flowering value between abs(), but the plus still stays.
So does anyone know how to get rid of that + ??
Thanks.
PS: What's the deal with those % btw (as in u"%d" % blah)? What are those for? Does that remove the plus? Can those be combined with a txt string? My attempts gave some errors.