1
0
forked from 0ad/0ad

Split GUI out to bottom corners based on suggestions, and move barter icons down

This was SVN commit r11963.
This commit is contained in:
WhiteTreePaladin 2012-06-11 01:07:41 +00:00
parent 29a11e24d5
commit d905e4c63a
4 changed files with 47 additions and 31 deletions

View File

@ -136,8 +136,10 @@ function displaySingle(entState, template)
getGUIObjectByName("specific").caption = specificName;
getGUIObjectByName("generic").caption = genericName;
getGUIObjectByName("player").caption = playerName;
getGUIObjectByName("playerColorBackground").sprite = "colour: " + playerColor;
getGUIObjectByName("playerColorBackground").tooltip = civName;
getGUIObjectByName("playerColorBackground").sprite = "colour: " + playerColor;
getGUIObjectByName("iconBorderPlayerColor").sprite = "colour: " + playerColor;
getGUIObjectByName("unitQueuePanelPlayerColor").sprite = "colour: " + playerColor;
// TODO: Set this to the current player, not the selected unit's player
//getGUIObjectByName("civIcon").tooltip = civName;
@ -167,7 +169,6 @@ function displaySingle(entState, template)
iconTooltip += "\n[font=\"serif-13\"]" + template.tooltip + "[/font]";
getGUIObjectByName("iconBorder").tooltip = iconTooltip;
getGUIObjectByName("iconBorderPlayerColor").sprite = "colour: " + playerColor;
// Unhide Details Area
getGUIObjectByName("detailsAreaSingle").hidden = false;

View File

@ -195,7 +195,7 @@
<!-- ================================ ================================ -->
<!-- Notification Area -->
<!-- ================================ ================================ -->
<object name="notificationPanel" type="image" size="50%-300 100%-300 50%+300 100%-240" ghost="true">
<object name="notificationPanel" type="image" size="50%-300 60 50%+300 120" ghost="true">
<object name="notificationText" size="0 0 100% 100%" type="text" style="notificationPanel" ghost="true"/>
</object>
@ -204,7 +204,7 @@
<!-- ================================ ================================ -->
<!-- Chat panel -->
<object name="chatPanel" size="0 80 100% 100%-240" type="image" ghost="true">
<object name="chatPanel" size="0 130 100% 100%-240" type="image" ghost="true">
<object name="chatText" size="3 1 100%-1 100%-1" type="text" style="chatPanel" ghost="true"/>
</object>
@ -494,7 +494,7 @@
<!-- START of BOTTOM PANEL -->
<!-- ================================ ================================ -->
<object size="50%-512 100%-180 50%+512 100%">
<object size="0 100%-180 100% 100%">
<!-- ================================ ================================ -->
<!-- Minimap -->
@ -533,9 +533,9 @@
</object>
<!-- ================================ ================================ -->
<!-- Supplemental Details Panel on Left -->
<!-- Supplemental Details Panel left of Selection Details-->
<!-- ================================ ================================ -->
<object size="208 100%-170 50%-110 100%" name="supplementalSelectionDetails" type="image" sprite="bottomLeft" z="30">
<object size="100%-422 100%-170 100%-224 100%" name="supplementalSelectionDetails" type="image" sprite="supplementalDetailsPanel" z="20">
<object name="unitFormationPanel"
size="24 12 100% 100%"
@ -563,11 +563,12 @@
</object>
</object>
<object name="unitBarterPanel" hidden="true"
size="5 5 100% 100%"
<object name="unitBarterPanel"
size="6 36 100% 100%"
hidden="true"
>
<object ghost="true" style="resourceText" type="text" size="0 0 100% 18">Exchange resources:</object>
<object size="0 18 100% 64">
<object ghost="true" style="resourceText" type="text" size="0 0 100% 20">Exchange resources:</object>
<object size="0 32 100% 78">
<repeat count="4">
<object name="unitBarterSellButton[n]" style="iconButton" type="button" size="0 0 46 46" tooltip_style="sessionToolTipBottomBold">
<object name="unitBarterSellIcon[n]" type="image" ghost="true" size="3 3 43 43"/>
@ -576,7 +577,7 @@
</object>
</repeat>
</object>
<object size="0 64 100% 110">
<object size="0 78 100% 124">
<repeat count="4">
<object name="unitBarterBuyButton[n]" style="iconButton" type="button" size="0 0 46 46" tooltip_style="sessionToolTipBottomBold">
<object name="unitBarterBuyIcon[n]" type="image" ghost="true" size="3 3 43 43"/>
@ -604,12 +605,12 @@
</object>
<!-- ================================ ================================ -->
<!-- Details Panel (Middle) -->
<!-- Selection Details Panel (Right ) -->
<!-- ================================ ================================ -->
<object name="selectionDetails"
type="image"
sprite="bottomMiddle"
size="50%-114 100%-205 50%+114 100%"
sprite="selectionDetailsPanel"
size="100%-228 100%-205 100% 100%"
hidden="false"
>
<!-- Unit details for Single Unit -->
@ -623,7 +624,7 @@
<object type="image" sprite="glassSquareIcon" ghost="true"/>
<!-- Experience bar -->
<object size="2 100%-9 100%-2 100%-1" type="image" name="experience" tooltip="Experience" tooltip_style="sessionToolTip">
<object size="3 100%-10 100%-3 100%-2" type="image" name="experience" tooltip="Experience" tooltip_style="sessionToolTip">
<object type="image" sprite="experienceBackground" ghost="true"/>
<object type="image" sprite="experienceForeground" ghost="true" name="experienceBar"/>
<object type="image" sprite="statsBarShader" ghost="true"/>
@ -703,7 +704,7 @@
</object>
</object>
<object size="2 100%-40 100%-2 100%-2" type="image" sprite="detailsShader" ghost="true"/>
<object size="2 100%-40 100%-2 100%-4" type="image" sprite="detailsShader" ghost="true"/>
</object>
<!-- Unit details for Multiple Units -->
@ -738,7 +739,7 @@
<object type="image" sprite="statsBarShader" ghost="true"/>
</object>
<!-- Stamina bar -->
<!-- Stamina bar -->
<object size="14 0 26 100%" type="image" name="staminaMultiple" tooltip="Stamina" tooltip_style="sessionToolTipBold">
<object type="image" sprite="staminaBackground" ghost="true"/>
<object type="image" sprite="staminaForeground" ghost="true" name="staminaBarMultiple"/>
@ -746,7 +747,7 @@
</object>
</object>
<object size="2 100%-40 100%-2 100%-2" type="image" sprite="detailsShader" ghost="true"/>
<object size="2 100%-40 100%-2 100%-4" type="image" sprite="detailsShader" ghost="true"/>
</object>
<!-- Unit Commands -->
@ -768,16 +769,17 @@
</object> <!-- END OF SELECTION DETAILS -->
<!-- ================================ ================================ -->
<!--Commands Panel -->
<!-- Commands Panel (Right of minimap)-->
<!-- ================================ ================================ -->
<object name="unitCommands"
type="image"
sprite="bottomRight"
size="622 100%-170 100% 100%"
sprite="unitCommandsPanel"
size="208 100%-170 602 100%"
hidden="false"
z="20"
>
<object name="unitConstructionPanel"
size="14 12 100% 100%"
size="10 12 100% 100%"
>
<object size="0 0 100% 100%">
<repeat count="24">
@ -789,7 +791,7 @@
</object>
<object name="unitResearchPanel"
size="14 100%-102 100% 100%"
size="10 100%-102 100% 100%"
>
<object size="0 0 100% 100%">
<repeat count="16">
@ -807,7 +809,7 @@
</object>
<object name="unitTrainingPanel"
size="14 12 100% 100%"
size="10 12 100% 100%"
>
<object size="0 0 100% 100%">
<repeat count="24">
@ -819,7 +821,7 @@
</object>
<object name="unitTradingPanel"
size="14 12 100% 100%"
size="10 12 100% 100%"
>
<object size="0 0 100% 100%">
<repeat count="4">
@ -836,6 +838,8 @@
type="image"
style="TranslucentPanelThinBorder"
>
<object size="4 4 100%-4 100%-4" name="unitQueuePanelPlayerColor" type="image"/>
<object size="-4 -2 52 54" type="image" sprite="stretched:session/icons/production.png" tooltip_style="sessionToolTipBottom" tooltip="Production queue">
<object name="queueProgress" ghost="true" style="iconButtonProgress" type="text"/>
</object>

View File

@ -165,7 +165,7 @@
</sprite>
<!-- Bottom Left Panel -->
<sprite name="bottomLeft">
<sprite name="supplementalDetailsPanel">
<!-- sides -->
<image texture="global/border/line_horiz.png"
@ -194,11 +194,13 @@
texture_size="0 0 4 4"
size="100%-4 100%-4 100% 100%"
/>
<image texture="global/border/line_corner_bottom_middle.png"
<image
texture="global/border/line_corner_bottom_left.png"
texture_size="0 0 4 4"
size="0 100%-4 4 100%"
/>
<image texture="global/border/line_corner_middle_right.png"
<image
texture="global/border/line_corner_top_left.png"
texture_size="0 0 4 4"
size="0 0 4 4"
/>
@ -212,7 +214,7 @@
</sprite>
<!-- Bottom Middle Panel -->
<sprite name="bottomMiddle">
<sprite name="selectionDetailsPanel">
<!-- background -->
<image texture="session/panel_middle.png"
@ -259,7 +261,7 @@
</sprite>
<!-- Bottom Right Panel -->
<sprite name="bottomRight">
<sprite name="unitCommandsPanel">
<!-- sides -->
<image texture="global/border/line_horiz.png"

View File

@ -703,6 +703,7 @@ function setupUnitBarterPanel(unitEntState)
*
* @param entState Entity state of the (first) selected unit.
* @param supplementalDetailsPanel Reference to the "supplementalSelectionDetails" GUI Object
* @param commandsPanel Reference to the "commandsPanel" GUI Object
* @param selection Array of currently selected entity IDs.
*/
function updateUnitCommands(entState, supplementalDetailsPanel, commandsPanel, selection)
@ -791,6 +792,14 @@ function updateUnitCommands(entState, supplementalDetailsPanel, commandsPanel, s
usedPanels["Trading"] = 1;
setupUnitTradingPanel(entState, selection);
}
supplementalDetailsPanel.hidden = false;
commandsPanel.hidden = false;
}
else // owned by another player
{
supplementalDetailsPanel.hidden = true;
commandsPanel.hidden = true;
}
// Hides / unhides Unit Panels (panels should be grouped by type, not by order, but we will leave that for another time)