1
0
forked from 0ad/0ad

Reduce maximum garrison icons to 12 so stances can be shown for siege rams, etc.

This was SVN commit r12537.
This commit is contained in:
Deiz 2012-08-27 16:56:58 +00:00
parent 9db71f5417
commit b4ba09c8b3
2 changed files with 4 additions and 4 deletions

View File

@ -590,7 +590,7 @@
size="24 12 100% 100%"
>
<object size="0 0 100% 100%">
<repeat count="16">
<repeat count="12">
<object name="unitGarrisonButton[n]" hidden="true" style="iconButton" type="button" size="0 0 36 36" tooltip_style="sessionToolTipBottomBold" z="100">
<object name="unitGarrisonIcon[n]" type="image" ghost="true" size="3 3 33 33"/>
<object name="unitGarrisonCount[n]" ghost="true" style="groupIconsText" type="text" size="0 0 100% 100%"/>

View File

@ -172,8 +172,8 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
break;
case GARRISON:
if (numberOfItems > 16)
numberOfItems = 16;
if (numberOfItems > 12)
numberOfItems = 12;
break;
case STANCE:
@ -895,7 +895,7 @@ function updateUnitCommands(entState, supplementalDetailsPanel, commandsPanel, s
// TODO: probably should load the stance list from a data file,
// and/or vary depending on what units are selected
var stances = ["violent", "aggressive", "passive", "defensive", "standground"];
if (hasClass(entState, "Unit") && !hasClass(entState, "Animal") && !entState.garrisonHolder && stances.length)
if (hasClass(entState, "Unit") && !hasClass(entState, "Animal") && stances.length)
{
setupUnitPanel(STANCE, usedPanels, entState, stances,
function (item) { performStance(entState.id, item); } );