mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 14:53:01 +00:00
* Fixed minor glitch which was causing the garrison icon to not appear. (Temporarily moved garrison value into command cell sheet, then changed mind and swapped it back to having its own sheet, since it'd probably need to be coloured to match the nearby supply icon.)
This was SVN commit r3673.
This commit is contained in:
@@ -1,3 +1 @@
|
||||
garrison,Garrison,
|
||||
unload,Unload,
|
||||
unloadtotarget,Unload to Target,
|
||||
|
||||
@@ -97,12 +97,13 @@ textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getCo
|
||||
// Update garrison capacity.
|
||||
if( shouldUpdateStat( "traits.garrison" ) )
|
||||
{
|
||||
// Update Supply/Garrison
|
||||
var guiObject = getGUIObjectByName("snStatusPaneGarrison");
|
||||
guiObject.caption = '';
|
||||
|
||||
if (selection[0].traits.garrison)
|
||||
{
|
||||
// Set garrison icon.
|
||||
getGUIObjectByName ("snStatusPaneGarrisonIcon").cell_id = cellGroup["Garrison"]["garrison"].id;
|
||||
if (selection[0].traits.garrison.curr && selection[0].traits.garrison.max)
|
||||
{
|
||||
guiObject.caption += '[color="blue"]' + selection[0].traits.garrison.curr + '/' + selection[0].traits.garrison.max + '[/color] ';
|
||||
@@ -116,6 +117,7 @@ textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getCo
|
||||
getGUIObjectByName ("snStatusPaneGarrisonIcon").hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( shouldUpdateStat( "traits.supply" ) )
|
||||
{
|
||||
guiObject = getGUIObjectByName("snStatusPaneSupply");
|
||||
@@ -126,7 +128,7 @@ textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getCo
|
||||
if (selection[0].traits.supply.curr && selection[0].traits.supply.max && selection[0].traits.supply.type)
|
||||
{
|
||||
// Set resource icon.
|
||||
getGUIObjectByName ("snStatusPaneSupplyIcon").cell_id = cellGroup["Resource"][selection[0].traits.supply.type];
|
||||
getGUIObjectByName ("snStatusPaneSupplyIcon").cell_id = cellGroup["Resource"][selection[0].traits.supply.type].id;
|
||||
// Special case for infinity.
|
||||
if (selection[0].traits.supply.curr == "0" && selection[0].traits.supply.max == "0")
|
||||
guiObject.caption += '[color="brown"] [icon="iconInfinity"] [/color] ';
|
||||
|
||||
@@ -1859,6 +1859,73 @@
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<!--
|
||||
==========================================
|
||||
SESSION GUI - ICON SHEETS - GARRISON
|
||||
==========================================
|
||||
-->
|
||||
|
||||
<sprite name="snIconSheetGarrison">
|
||||
<image texture="session/icons/sheets/garrison.dds"
|
||||
cell_size="64 64"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconSheetGarrisonOver">
|
||||
<effect add_color="42 42 42 0"/>
|
||||
<image texture="session/icons/sheets/garrison.dds"
|
||||
cell_size="64 64"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconSheetGarrisonDisabled">
|
||||
|
||||
<image texture="session/icons/sheets/garrison.dds"
|
||||
cell_size="64 64"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<sprite name="snIconSheetGarrisonButton">
|
||||
<image texture="session/icons/bkg/command_outer.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/bkg/command_inner.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/sheets/garrison.dds"
|
||||
cell_size="64 64"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconSheetGarrisonButtonOver">
|
||||
<image texture="session/icons/bkg/command_outer.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image
|
||||
texture="session/icons/bkg/command_inner.dds"
|
||||
size="0 0 100% 100%"
|
||||
>
|
||||
<effect add_color="42 42 42 0"/>
|
||||
</image>
|
||||
<image texture="session/icons/sheets/garrison.dds"
|
||||
cell_size="64 64"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
<sprite name="snIconSheetGarrisonButtonDisabled">
|
||||
<image texture="session/icons/bkg/command_outer.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/bkg/command_inner.dds"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
<image texture="session/icons/sheets/garrison.dds"
|
||||
cell_size="64 64"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<!--
|
||||
==========================================
|
||||
|
||||
Reference in New Issue
Block a user