Ticket #3197: t3197_pop_cap_tooltip_v2.patch
File t3197_pop_cap_tooltip_v2.patch, 1.9 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/gui/session/session.js
709 709 Engine.GetGUIObjectByName("resourceFood").caption = Math.floor(playerState.resourceCounts.food); 710 710 Engine.GetGUIObjectByName("resourceWood").caption = Math.floor(playerState.resourceCounts.wood); 711 711 Engine.GetGUIObjectByName("resourceStone").caption = Math.floor(playerState.resourceCounts.stone); 712 712 Engine.GetGUIObjectByName("resourceMetal").caption = Math.floor(playerState.resourceCounts.metal); 713 713 Engine.GetGUIObjectByName("resourcePop").caption = playerState.popCount + "/" + playerState.popLimit; 714 714 Engine.GetGUIObjectByName("population").tooltip = translate("Population (current / limit)") + "\n" 715 + sprintf(translate("Maximum population: %(popCap)s"), { "popCap": playerState.popMax }); 716 715 717 g_IsTrainingBlocked = playerState.trainingBlocked; 716 718 } 717 719 718 720 function selectAndMoveTo(ent) 719 721 { -
binaries/data/mods/public/gui/session/top_panel/resource_population.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <object name="population" size="370 0 460 100%" type="image" style="resourceCounter" tooltip_style="sessionToolTipBold"> 3 <translatableAttribute id="tooltip">Population (current / limit)</translatableAttribute>4 3 <object size="0 -4 40 34" type="image" sprite="stretched:session/icons/resources/population.png" ghost="true"/> 5 4 <object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourcePop"/> 6 5 </object>