forked from 0ad/0ad
Preparation for garrison code
This was SVN commit r8295.
This commit is contained in:
parent
1784c67c8b
commit
69b2581ff0
@ -420,7 +420,7 @@
|
||||
<!--<object size="-5 -2 59 62" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip" cell_id="5" tooltip="Formations"/>-->
|
||||
|
||||
<object size="0 0 100% 100%">
|
||||
<repeat count="15">
|
||||
<repeat count="16">
|
||||
<object name="unitFormationButton[n]" hidden="true" style="iconButton" type="button" size="0 0 38 38" z="100">
|
||||
<object name="unitFormationIcon[n]" type="image" style="formationIcon" ghost="true" size="1 1 37 37"/>
|
||||
</object>
|
||||
@ -428,13 +428,27 @@
|
||||
</object>
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
GARRISON GOES HERE
|
||||
-->
|
||||
|
||||
<object name="unitGarrisonPanel"
|
||||
size="20 10 100% 100%"
|
||||
>
|
||||
<!--<object size="-6 -6 50 50" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip" cell_id="1" tooltip="Garrison"/>-->
|
||||
|
||||
<object size="0 0 100% 100%">
|
||||
<repeat count="15">
|
||||
<repeat count="16">
|
||||
<object name="unitGarrisonButton[n]" hidden="true" style="iconButton" type="button" size="0 0 38 38" z="100">
|
||||
<object name="unitGarrisonIcon[n]" type="image" ghost="true" size="1 1 37 37"/>
|
||||
<object name="unitGarrisonCount[n]" ghost="true" style="groupIconsText" type="text" size="0 0 100% 100%"/>
|
||||
@ -443,6 +457,21 @@
|
||||
</object>
|
||||
</object>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
|
@ -122,15 +122,15 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
|
||||
}
|
||||
if (guiName == "Formation" || guiName == "Garrison")
|
||||
{
|
||||
if (numberOfItems > 15)
|
||||
numberOfItems = 15;
|
||||
if (numberOfItems > 16)
|
||||
numberOfItems = 16;
|
||||
}
|
||||
else if (guiName == "Queue")
|
||||
{
|
||||
if (numberOfItems > 16)
|
||||
numberOfItems = 16;
|
||||
}
|
||||
else if ( guiName == "Command")
|
||||
else if (guiName == "Command")
|
||||
{
|
||||
if (numberOfItems > 4)
|
||||
numberOfItems = 4;
|
||||
@ -176,9 +176,29 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
|
||||
break;
|
||||
|
||||
case GARRISON:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
!!!!!
|
||||
GARRISON GOES HERE (need to customize this)
|
||||
!!!!!
|
||||
|
||||
|
||||
var tooltip = getEntityName(template);
|
||||
var count = g_Selection.groups.getCount(item);
|
||||
getGUIObjectByName("unit"+guiName+"Count["+i+"]").caption = (count > 1 ? count : "");
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case FORMATION:
|
||||
@ -317,17 +337,33 @@ function updateUnitCommands(entState, supplementalDetailsPanel, commandsPanel, s
|
||||
setupUnitPanel("Command", usedPanels, entState, commands,
|
||||
function (item) { performCommand(entState.id, item); } );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
!!!!!
|
||||
GARRISON GOES HERE (need to customize this)
|
||||
!!!!!
|
||||
*/
|
||||
|
||||
if (selection.length > 1)
|
||||
setupUnitPanel("Garrison", usedPanels, entState, g_Selection.groups.getTemplateNames(),
|
||||
function (entType) { changePrimarySelectionGroup(entType); } );
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
var formations = getEntityFormationsList(entState);
|
||||
if (formations.length)
|
||||
setupUnitPanel("Formation", usedPanels, entState, formations,
|
||||
function (item) { performFormation(entState.id, item); } );
|
||||
|
||||
*/
|
||||
|
||||
if (entState.buildEntities && entState.buildEntities.length)
|
||||
{
|
||||
setupUnitPanel("Construction", usedPanels, entState, entState.buildEntities, startBuildingPlacement);
|
||||
|
Loading…
Reference in New Issue
Block a user