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:
parent
9db71f5417
commit
b4ba09c8b3
@ -590,7 +590,7 @@
|
|||||||
size="24 12 100% 100%"
|
size="24 12 100% 100%"
|
||||||
>
|
>
|
||||||
<object size="0 0 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="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="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%"/>
|
<object name="unitGarrisonCount[n]" ghost="true" style="groupIconsText" type="text" size="0 0 100% 100%"/>
|
||||||
|
@ -172,8 +172,8 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GARRISON:
|
case GARRISON:
|
||||||
if (numberOfItems > 16)
|
if (numberOfItems > 12)
|
||||||
numberOfItems = 16;
|
numberOfItems = 12;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STANCE:
|
case STANCE:
|
||||||
@ -895,7 +895,7 @@ function updateUnitCommands(entState, supplementalDetailsPanel, commandsPanel, s
|
|||||||
// TODO: probably should load the stance list from a data file,
|
// TODO: probably should load the stance list from a data file,
|
||||||
// and/or vary depending on what units are selected
|
// and/or vary depending on what units are selected
|
||||||
var stances = ["violent", "aggressive", "passive", "defensive", "standground"];
|
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,
|
setupUnitPanel(STANCE, usedPanels, entState, stances,
|
||||||
function (item) { performStance(entState.id, item); } );
|
function (item) { performStance(entState.id, item); } );
|
||||||
|
Loading…
Reference in New Issue
Block a user