1
0
forked from 0ad/0ad
0ad/binaries/data/mods/public/gui/session_new/session.xml
WhiteTreePaladin fa1dc05de2 New GUI layout
Delete confirmation dialog
Resource bar replaces resource quantity/icon
Selected units are grouped by type regardless of rank
Ranked units use the same icon
"Basic" units are now considered to have the rank of "Basic" for
grouping purposes

This was SVN commit r8180.
2010-09-25 15:22:41 +00:00

561 lines
21 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/common/functions_global_object.js" />
<script file="gui/common/timer.js"/>
<script file="gui/session_new/session.js"/>
<script file="gui/session_new/selection.js"/>
<script file="gui/session_new/input.js"/>
<script file="gui/session_new/music.js"/>
<script file="gui/session_new/menu.js"/>
<script file="gui/session_new/selection_details.js"/>
<script file="gui/session_new/unit_commands.js"/>
<script file="gui/session_new/messages.js"/>
<script file="gui/session_new/utility_functions.js"/>
<object name="sn" hotkey="session.gui.toggle">
<action on="Tick">
onTick();
</action>
<action on="SimulationUpdate">
onSimulationUpdate();
</action>
<action on="Press">
this.hidden = !this.hidden;
</action>
<!-- ================================ ================================ -->
<!-- ALPHA LABELS (alpha, build time, revision) -->
<!-- ================================ ================================ -->
<!-- Displays Alpha name and number (Alpha 2 Bellerophon) -->
<object size="100%-200 0 100%-8 25" name="alphaLabel" type="text" style="centeredText" font="serif-bold-16" textcolor="white">
<action on="Load"><![CDATA[this.caption = "ALPHA II : Bxxxxxxxxxx";]]></action>
</object>
<!-- Displays build date and revision number-->
<object size="100%-200 25 100%-8 45" name="buildTimeLabel" type="text" style="centeredText" font="serif-12" textcolor="white">
<action on="Load"><![CDATA[this.caption = buildTime(0) + " (" + buildTime(2) + ")";]]></action>
</object>
<!-- ================================ ================================ -->
<!-- HOTKEYS (For some reason, they won't work properly unless outside menu) -->
<!-- ================================ ================================ -->
<!-- Exit button Hotkey -->
<object hotkey="leave">
<action on="Press"><![CDATA[
messageBox(400, 200, "Do you really want to quit?", "Confirmation", 0,
["Yes", "No!"], [leaveGame, null]);
]]></action>
</object>
<!-- Depending on the current state, it either opens message window or closes message window / posts message -->
<object hotkey="chat">
<action on="Press">toggleChatWindow();</action>
</object>
<!-- Delete button Hotkey (For some reason it won't work when the console is visible -->
<object hotkey="killUnit">
<action on="Press">performCommand(g_Selection.toList()[0], "delete");</action>
</object>
<!-- ================================ ================================ -->
<!-- Developer / Debug items -->
<!-- ================================ ================================ -->
<!-- Debug text -->
<object name="debug"
type="text"
size="0 50 50% 100%"
ghost="true"
textcolor="yellow"
font="mono-stroke-10"
/>
<!-- Dev/cheat commands -->
<object name="devCommands" size="100%-155 50 100%-16 178" z="200" type="image" sprite="devCommandsBackground"
hidden="true" hotkey="session.devcommands.toggle">
<action on="Press">
this.hidden = !this.hidden;
</action>
<object size="0 0 100%-18 16" type="text" style="devCommandsText">Control all units</object>
<object size="100%-16 0 100% 16" type="checkbox" name="devControlAll" style="wheatCrossBox"/>
<object size="0 16 100%-18 32" type="text" style="devCommandsText">Display selection state</object>
<object size="100%-16 16 100% 32" type="checkbox" name="devDisplayState" style="wheatCrossBox"/>
<object size="0 32 100%-18 48" type="text" style="devCommandsText">Pathfinder overlay</object>
<object size="100%-16 32 100% 48" type="checkbox" style="wheatCrossBox">
<action on="Press">Engine.GuiInterfaceCall("SetPathfinderDebugOverlay", this.checked);</action>
</object>
<object size="0 48 100%-18 64" type="text" style="devCommandsText">Obstruction overlay</object>
<object size="100%-16 48 100% 64" type="checkbox" style="wheatCrossBox">
<action on="Press">Engine.GuiInterfaceCall("SetObstructionDebugOverlay", this.checked);</action>
</object>
<object size="0 64 100%-18 80" type="text" style="devCommandsText">Unit motion overlay</object>
<object size="100%-16 64 100% 80" type="checkbox" style="wheatCrossBox">
<action on="Press">g_Selection.SetMotionDebugOverlay(this.checked);</action>
</object>
<object size="0 80 100%-18 96" type="text" style="devCommandsText">Range overlay</object>
<object size="100%-16 80 100% 96" type="checkbox" style="wheatCrossBox">
<action on="Press">Engine.GuiInterfaceCall("SetRangeDebugOverlay", this.checked);</action>
</object>
<object size="0 96 100%-18 112" type="text" style="devCommandsText">Restrict camera</object>
<object size="100%-16 96 100% 112" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Press">gameView.constrainCamera = this.checked;</action>
</object>
<object size="0 112 100%-18 128" type="text" style="devCommandsText">Reveal map</object>
<object size="100%-16 112 100% 128" type="checkbox" style="wheatCrossBox">
<action on="Press">Engine.SetRevealMap(this.checked);</action>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Pause Overlay -->
<!-- ================================ ================================ -->
<object type="button"
name="pauseOverlay"
size="0 0 100% 100%"
tooltip_style="snToolTip"
tooltip="Click to Unpause Game"
hidden="true"
z="0"
>
<object size="0 0 100% 100%" type="image" sprite="devCommandsBackground" ghost="true" z="0"/>
<object size="0 0 100% 100%" type="text" style="largeBoldCenteredText" textcolor="white" ghost="true" z="0">Game Paused</object>
<action on="Press">togglePause();</action>
</object>
<!-- ================================ ================================ -->
<!-- Notification Area -->
<!-- ================================ ================================ -->
<object name="notificationPanel" type="image" size="217 100%-240 650 100%-180" ghost="true">
<object name="notificationText" size="0 0 100% 100%" type="text" style="notificationPanel" ghost="true"/>
</object>
<!-- ================================ ================================ -->
<!-- Chat -->
<!-- ================================ ================================ -->
<!-- Chat panel -->
<object name="chatPanel" size="0 80 100% 100%-240" type="image" ghost="true">
<object name="chatText" size="3 1 100%-1 100%-1" type="text" style="chatPanel" ghost="true"/>
</object>
<!-- Chat window -->
<object name="chatWindow" size="50%-160 50%-32 50%+160 50%+32" type="image" hidden="true" z="10" style="wheatWindow">
<object name="chatInput" size="0 0 100%-0 24" type="input" style="wheatInput" max_length="80">
<action on="Press">submitChatInput();</action>
</object>
<object size="32 32 144 64" type="button" style="wheatButton">
Cancel
<action on="Press">toggleChatWindow();</action>
</object>
<object size="100%-144 32 100%-32 64" type="button" style="wheatButton">
Send
<action on="Press">submitChatInput();</action>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Settings Window -->
<!-- ================================ ================================ -->
<object name="settingsWindow"
style="wheatWindow"
type="image"
size="50%-180 50%-200 50%+180 50%+50"
hidden="true"
z="30"
>
<object name="settingsTitleBar" style="wheatWindowTitleBar" type="text">Settings</object>
<object name="settingsOptions"
size="30 30 100%-30 150"
type="image"
style="sessionPanel"
>
<!-- Settings / shadows -->
<object size="0 10 100%-80 35" type="text" style="settingsText" ghost="true">Enable Shadows</object>
<object name="shadowsCheckbox" size="100%-56 15 100%-30 40" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.shadows) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.shadows = this.checked;</action>
</object>
<!-- Settings / Water -->
<object size="0 35 100%-80 60" type="text" style="settingsText" ghost="true">Enable Water Reflections</object>
<object name="fancyWaterCheckbox" size="100%-56 40 100%-30 65" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.fancyWater) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.fancyWater = this.checked;</action>
</object>
<!-- Settings / Music-->
<object size="0 60 100%-80 85" type="text" style="settingsText" ghost="true">Enable Music</object>
<object size="100%-56 65 100%-30 90" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Press">if (this.checked) startMusic(); else stopMusic();</action>
</object>
<!-- Settings / Dev Overlay -->
<object size="0 85 100%-80 110" type="text" style="settingsText" ghost="true">Developer Overlay</object>
<object size="100%-56 90 100%-30 115" type="checkbox" style="wheatCrossBox" checked="false">
<action on="Press">toggleDeveloperOverlay();</action>
</object>
</object>
<object name="settingsOKButton"
style="wheatButtonFancy"
type="button"
size="50%-50 100%-52 50%+50 100%-20"
>
<object size="0 0 100% 100%" type="text" style="centeredText" name="settingsOKButtonText" ghost="true">OK</object>
<action on="Press">toggleSettingsWindow();</action>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Menu Details -->
<!-- ================================ ================================ -->
<object name="menu"
size="0 0 114 160"
type="image"
sprite="menuBackground"
hidden="true"
z="20"
>
<!-- Settings button -->
<object type="button"
name="settingsButton"
style="wheatButtonFancy"
size="0 32 114 64"
tooltip_style="snToolTip"
>
<object size="0 0 100% 100%" type="text" style="centeredText" name="settingsButtonText" ghost="true">Settings</object>
<action on="Press">toggleSettingsWindow();</action>
</object>
<!-- Chat button -->
<object type="button"
name="chatButton"
style="wheatButtonFancy"
size="0 64 114 96"
tooltip_style="snToolTip"
>
<object size="0 0 100% 100%" type="text" style="centeredText" name="chatButtonText" ghost="true">Chat</object>
<action on="Press">toggleChatWindow();</action>
</object>
<!-- Pause Button -->
<object type="button"
style="wheatButtonFancy"
name="pauseButton"
size="0 96 114 128"
tooltip_style="snToolTip"
>
<object size="0 0 100% 100%" type="text" ghost="true" style="centeredText">Pause</object>
<action on="Press">togglePause();</action>
</object>
<!-- Exit button -->
<object type="button"
name="exitButton"
style="wheatButtonFancy"
size="0 128 114 160"
tooltip_style="snToolTip"
>
<object size="0 0 100% 100%" type="text" style="centeredText" name="exitButtonText" ghost="true" font="serif-14">Quit</object>
<action on="Press">
toggleMenu();
<![CDATA[messageBox(400, 200, "Do you really want to quit?", "Confirmation", 0, ["Yes", "No!"], [leaveGame, null]);]]>
</action>
</object>
</object>
<!-- Menu Button -->
<object type="button"
name="menuButton"
style="wheatButtonFancy"
size="0 0 114 32"
tooltip_style="snToolTip"
z="30"
>
<object size="0 0 100% 100%" type="text" style="largeBoldCenteredText" name="menuButtonText" ghost="true">Menu</object>
<action on="Press">toggleMenu();</action>
</object>
<!-- ================================ ================================ -->
<!-- Player resource bar -->
<!-- ================================ ================================ -->
<object
size="50%-300 -4 50%+300 28"
type="image"
style="resourcePanel"
z="140"
>
<!-- Food -->
<object size="50 4 150 100%" type="image" style="resourceCounter" tooltip="Food" >
<object size="0 0 28 24" type="image" style="resourceIcon" cell_id="0"/>
<object size="28 0 150 24" type="text" style="resourceText" name="resourceFood"/>
</object>
<!-- Wood -->
<object size="150 4 250 100%" type="image" style="resourceCounter" tooltip="Wood">
<object size="0 0 28 24" type="image" style="resourceIcon" cell_id="1"/>
<object size="28 0 250 24" type="text" style="resourceText" name="resourceWood"/>
</object>
<!-- Stone -->
<object size="250 4 350 100%" type="image" style="resourceCounter" tooltip="Stone">
<object size="0 0 28 24" type="image" style="resourceIcon" cell_id="2"/>
<object size="28 0 350 24" type="text" style="resourceText" name="resourceStone"/>
</object>
<!-- Metal -->
<object size="350 4 450 100%" type="image" style="resourceCounter" tooltip="Metal">
<object size="0 0 28 24" type="image" style="resourceIcon" cell_id="3"/>
<object size="28 0 450 24" type="text" style="resourceText" name="resourceMetal"/>
</object>
<!-- Population -->
<object size="450 4 550 100%" type="image" style="resourceCounter" tooltip="Population (current / maximum)">
<object size="0 0 28 24" type="image" style="resourceIcon" cell_id="4"/>
<object size="28 0 550 24" type="text" style="resourceText" name="resourcePop"/>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Unit Selection Area -->
<!-- ================================ ================================ -->
<object name="unitSelectionPanel"
size="50%-300 20 50%+300 60"
>
<object size="0 0 100% 100%">
<repeat count="13">
<object name="unitSelectionButton[n]" hidden="true" style="iconButton" type="button" size="0 0 36 36" z="100">
<object name="unitSelectionIcon[n]" type="image" ghost="true" size="1 1 35 35"/>
<object name="unitSelectionCount[n]" ghost="true" style="groupIconsText" type="text" size="0 0 100% 100%"/>
</object>
</repeat>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Minimap -->
<!-- ================================ ================================ -->
<object
name="minimapPanel"
size="100%-180 100%-180 100% 100%"
type="image"
style="insetWheatWindow"
>
<object name="minimap"
type="minimap"
size="6 6 100%-6 100%-6"
>
<action on="WorldClick">handleMinimapEvent(arguments[0]);</action>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Details Panel -->
<!-- ================================ ================================ -->
<object name="selectionDetails"
type="image"
style="sessionPanel"
size="22 100%-160 202 100%"
hidden="true"
z="20"
>
<!-- Big unit icon -->
<object size= "50%-53 -10 50%+53 96" type="image" name="iconBorder" style="insetWheatWindow" tooltip_style="snToolTip">
<object size= "3 3 100%-3 100%-3" type="image" name="icon" ghost="true"/>
<object size="100%-32 0 100% 32" name="rankIcon" type="image" cell_id="-1" sprite="snIconSheetRank" ghost="true"/>
<!-- Health bar -->
<object size="100%+8 16 100%+18 100%" type="image" name="health" tooltip="Hitpoints" tooltip_style="snToolTip">
<object type="image" sprite="healthBackground" ghost="true"/>
<object type="image" sprite="healthForeground" ghost="true" name="healthBar"/>
<object type="image" sprite="statsBarShader" ghost="true"/>
</object>
<!-- Stamina bar -->
<object size="100%+20 16 100%+30 100%" type="image" name="stamina" tooltip="Stamina" tooltip_style="snToolTip">
<object type="image" sprite="staminaBackground" ghost="true"/>
<object type="image" sprite="staminaForeground" ghost="true" name="staminaBar"/>
<object type="image" sprite="statsBarShader" ghost="true"/>
</object>
<!-- Resource bar -->
<object size="100%+8 16 100%+18 100%" type="image" name="resources" tooltip="Resources" tooltip_style="snToolTip">
<object type="image" sprite="resourceBackground" ghost="true"/>
<object type="image" sprite="resourceForeground" ghost="true" name="resourceBar"/>
<object type="image" sprite="statsBarShader" ghost="true"/>
</object>
</object>
<!-- Stats -->
<object size="-2 6 40 96" name="statsArea" type="image">
<!-- Attack icon -->
<object size="0 0 40 40" type="image" name="attackIcon" sprite="snIconSheetStance" cell_id="1" tooltip_style="snToolTip"/>
<!-- Armour icon -->
<object size="0 40 40 80" type="image" name="armourIcon" sprite="snIconSheetStance" cell_id="3" tooltip_style="snToolTip"/>
</object>
<!-- Names -->
<object size="50%-112 100%-60 50%+112 100%" name="names" type="image" style="sessionPanel">
<!-- Specific Name -->
<object size="0 -4 100% 30" name="specific" type="text" style="centeredText" font="serif-bold-18" tooltip_style="snToolTip"/>
<!-- Player Name -->
<object size="0 26 100% 100%-2" name="player" type="text" style="centeredText" font="serif-bold-stroke-14" tooltip_style="snToolTip"/>
</object>
<!-- Unit Commands -->
<object name="unitCommandPanel"
size="50%-112 100%-30 50%+112 100%"
type="image"
style="sessionPanel"
z="30"
>
<object size="0 2 100% 100%-2">
<repeat count="8">
<object name="unitCommandButton[n]" hidden="true" style="iconButton" type="button" size="0 0 27 27">
<object name="unitCommandIcon[n]" ghost="true" type="image" size="3 3 24 24" style="commandIcon"/>
</object>
</repeat>
</object>
</object>
</object> <!-- END OF SELECTION DETAILS -->
<!-- ================================ ================================ -->
<!--Commands Panel -->
<!-- ================================ ================================ -->
<object name="unitCommands"
type="image"
style="sessionPanel"
size="204 100%-104 676 100%"
hidden="true"
>
<object name="unitConstructionPanel"
size="28 4 100% 100%"
>
<!--<object size="-2 -2 54 54" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip"
cell_id="0" tooltip="Construction"/>-->
<object size="0 0 100% 50">
<repeat count="18">
<object name="unitConstructionButton[n]" hidden="true" style="iconButton" type="button" size="0 0 48 48">
<object name="unitConstructionIcon[n]" type="image" ghost="true" size="1 1 47 47"/>
</object>
</repeat>
</object>
</object>
<object name="unitStancePanel"
style="goldPanelFrilly"
size="0 100%-56 100% 100%"
type="text"
>
<object size="-5 -2 59 62" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip"
cell_id="4" tooltip="Stances"/>
[stance commands]
</object>
<object name="unitFormationPanel"
style="goldPanelFrilly"
size="0 100%-56 100% 100%"
type="text"
>
<object size="-5 -2 59 62" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip"
cell_id="5" tooltip="Formations"/>
[formation commands]
</object>
<object name="unitResearchPanel"
style="goldPanelFrilly"
size="0 100%-56 100% 100%"
type="text"
>
<object size="-5 -2 59 62" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip"
cell_id="1" tooltip="Research"/>
[research commands]
</object>
<object name="unitTrainingPanel"
size="0 0 100% 100%"
>
<!--<object size="-2 -2 54 54" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip"
cell_id="2" tooltip="Training"/>-->
<object size="28 4 100% 100%">
<repeat count="18">
<object name="unitTrainingButton[n]" hidden="true" style="iconButton" type="button" size="0 0 48 48">
<object name="unitTrainingIcon[n]" type="image" ghost="true" size="1 1 47 47"/>
</object>
</repeat>
</object>
</object>
<object name="unitQueuePanel"
style="sessionPanel"
size="0 -52 100% 0"
type="image"
>
<object size="-2 -4 54 52" type="image" sprite="snIconSheetTab" tooltip_style="snToolTip"
cell_id="3" tooltip="Production queue" />
<object size="54 4 100% 100%">
<repeat count="18">
<object name="unitQueueButton[n]" hidden="true" style="iconButton" type="button" size="0 0 42 42">
<object name="unitQueueIcon[n]" ghost="true" type="image" size="1 1 41 41"/>
<object name="unitQueueCount[n]" ghost="true" style="iconButtonCount" type="text"/>
<object name="unitQueueProgress[n]" ghost="true" style="iconButtonProgress" type="text"/>
</object>
</repeat>
</object>
</object>
</object>
</object> <!-- END OF SN OBJECT -->
<!-- ================================ ================================ -->
<!-- Selection bandbox -->
<!-- ================================ ================================ -->
<object name="bandbox" type="image" sprite="bandbox" ghost="true" hidden="true" z="100"/>
<!-- ================================ ================================ -->
<!-- Network status -->
<!-- ================================ ================================ -->
<object name="netStatus" type="text" style="netStatus" z="100" hidden="true">
<object type="button"
name="disconnectedExitButton"
style="wheatButtonFancy"
size="50%-84 50%+128 50%+84 50%+160"
tooltip_style="snToolTip"
hidden="true"
>
<object size="0 0 100% 100%" type="text" style="centeredText" name="disconnectedExitButtonText" ghost="true" font="serif-14">Return to Main Menu</object>
<action on="Press">leaveGame()</action>
</object>
</object>
</objects>