forked from 0ad/0ad
Show the maximum population setting in a tooltip. Patch by elexis. Fixes #3197
This was SVN commit r16583.
This commit is contained in:
parent
a959fcf337
commit
42c04cdad2
@ -711,6 +711,8 @@ function updatePlayerDisplay()
|
||||
Engine.GetGUIObjectByName("resourceStone").caption = Math.floor(playerState.resourceCounts.stone);
|
||||
Engine.GetGUIObjectByName("resourceMetal").caption = Math.floor(playerState.resourceCounts.metal);
|
||||
Engine.GetGUIObjectByName("resourcePop").caption = playerState.popCount + "/" + playerState.popLimit;
|
||||
Engine.GetGUIObjectByName("population").tooltip = translate("Population (current / limit)") + "\n" +
|
||||
sprintf(translate("Maximum population: %(popCap)s"), { "popCap": playerState.popMax });
|
||||
|
||||
g_IsTrainingBlocked = playerState.trainingBlocked;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<object name="population" size="370 0 460 100%" type="image" style="resourceCounter" tooltip_style="sessionToolTipBold">
|
||||
<translatableAttribute id="tooltip">Population (current / limit)</translatableAttribute>
|
||||
<object size="0 -4 40 34" type="image" sprite="stretched:session/icons/resources/population.png" ghost="true"/>
|
||||
<object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourcePop"/>
|
||||
</object>
|
||||
|
Loading…
Reference in New Issue
Block a user