From 69b2581ff0cf037002b90e2e00fcddc5793c23b5 Mon Sep 17 00:00:00 2001 From: WhiteTreePaladin Date: Wed, 6 Oct 2010 18:55:46 +0000 Subject: [PATCH] Preparation for garrison code This was SVN commit r8295. --- .../mods/public/gui/session_new/session.xml | 33 ++++++++++++- .../public/gui/session_new/unit_commands.js | 46 +++++++++++++++++-- 2 files changed, 72 insertions(+), 7 deletions(-) diff --git a/binaries/data/mods/public/gui/session_new/session.xml b/binaries/data/mods/public/gui/session_new/session.xml index 49e64cf559..760e083b9d 100644 --- a/binaries/data/mods/public/gui/session_new/session.xml +++ b/binaries/data/mods/public/gui/session_new/session.xml @@ -420,7 +420,7 @@ - + + + + + + + + + + + + + - + diff --git a/binaries/data/mods/public/gui/session_new/unit_commands.js b/binaries/data/mods/public/gui/session_new/unit_commands.js index 2d8965c289..6b7b505257 100644 --- a/binaries/data/mods/public/gui/session_new/unit_commands.js +++ b/binaries/data/mods/public/gui/session_new/unit_commands.js @@ -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);