1
0
forked from 0ad/0ad
0ad/binaries/data/mods/official/gui/test/4_session.xml

619 lines
22 KiB
XML

<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- SESSION GUI -
==========================================
-->
<objects>
<object name="sn"
hidden="true"
hotkey="session.gui.toggle"
>
<action on="Press"><![CDATA[
guiToggle (this.name);
]]></action>
<!-- EMPTY OBJECT USED TO FLIP THE GUI TO VARIOUS ORIENTATIONS. -->
<object name="snFlip"
hotkey="session.gui.flip"
>
<action on="Press"><![CDATA[
flipGUI();
]]></action>
</object>
<!-- EMPTY OBJECT USED TO TOGGLE WATER RENDERING. -->
<object name="snWaterToggle"
hotkey="water.toggle"
>
<action on="Press"><![CDATA[
toggleWater();
]]></action>
</object>
<!-- EMPTY OBJECT USED TO RAISE WATER PLANE. -->
<object name="snWaterRaise"
hotkey="water.raise"
>
<action on="Press"><![CDATA[
setWaterHeight( getWaterHeight() + 0.25 );
]]></action>
</object>
<!-- EMPTY OBJECT USED TO LOWER WATER PLANE. -->
<object name="snWaterLower"
hotkey="water.lower"
>
<action on="Press"><![CDATA[
setWaterHeight( getWaterHeight() - 0.25 );
]]></action>
</object>
<!-- EMPTY OBJECT USED TO PAUSE/UNPAUSE GAME. -->
<object name="snPause"
hotkey="pause"
>
<action on="Press"><![CDATA[
setPaused( !isPaused() );
]]></action>
</object>
<!-- GROUP: MINIMAP -->
<object name="snMiniMap"
hotkey="session.minimap.toggle"
>
<action on="Press"><![CDATA[
guiToggle (this.name);
]]></action>
<object name="snMiniMapBorder"
style="skin*Hele*Window"
type="image"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 100, 100, 0, 0, 180, 180);
addCrd (this.name, lb, 0, 100);
addCrd (this.name, lt, 0, 0);
addCrd (this.name, rt, 100, 0);
]]></action>
<object name="snMiniMapDisplay"
style="snObject"
type="minimap"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 100, 100, 5, 5, 170, 170);
addCrd (this.name, lb, 0, 100);
addCrd (this.name, lt, 0, 0);
addCrd (this.name, rt, 100, 0);
]]></action>
<object name="snMiniMapEdge"
style="skin*Hele*BorderBlack"
type="image"
ghost="true"
/>
</object>
</object>
<object name="snMiniMapButtonGroup"
style="skin*Hele*BorderBlack"
type="image"
ghost="true"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 100, 100, getCrd ("snMiniMapBorder").coord[rb].width+1, 0,
20, getCrd ("snMiniMapBorder").coord[rb].height);
addCrd (this.name, lb, 0, 100);
addCrd (this.name, lt, 0, 0);
addCrd (this.name, rt, 100, 0);
]]></action>
<object name="snMiniMapButton_1"
style="skin*Hele*Button"
type="button"
>
</object>
<object name="snMiniMapButton_2"
style="skin*Hele*Button"
type="button"
>
</object>
<object name="snMiniMapButton_3"
style="skin*Hele*Button"
type="button"
>
</object>
<object name="snMiniMapButton_4"
style="skin*Hele*Button"
type="button"
>
<action on="Load"><![CDATA[
// Seek through this group of buttons (determining length from last object's name).
max = this.name.substring (this.name.lastIndexOf ("_")+1, this.name.length);
for (loop = 1; loop <= max; loop++)
{
tempName = this.name.substring (0, this.name.lastIndexOf ("_")+1) + loop;
// Set size/position.
addCrd (tempName,
rb, 100, 100, 0,
getCrd ("snMiniMapButtonGroup").coord[rb].y+(getCrd ("snMiniMapButtonGroup").coord[rb].height/max)*(loop-1),
getCrd ("snMiniMapButtonGroup").coord[rb].width,
getCrd ("snMiniMapButtonGroup").coord[rb].height/max);
addCrd (tempName, lb, 0, 100);
addCrd (tempName, lt, 0, 0);
addCrd (tempName, rt, 100, 0);
// Set tooltip.
getGUIObjectByName (tempName).tooltip = "This button doesn't do anything ... yet.";
getGUIObjectByName (tempName).tooltip_style = "snToolTip";
}
]]></action>
</object>
</object>
</object>
<!-- GROUP: RESOURCE COUNTER -->
<object name="snResourceCounter"
hotkey="resourcepool.toggle"
>
<action on="Press"><![CDATA[
guiToggle(this.name);
]]></action>
<object name="snResourceCounter_1"
style="snCounter"
type="button"
/>
<object name="snResourceCounter_2"
style="snCounter"
type="button"
/>
<object name="snResourceCounter_3"
style="snCounter"
type="button"
/>
<object name="snResourceCounter_4"
style="snCounter"
type="button"
/>
<object name="snResourceCounter_5"
style="snCounter"
type="button"
>
<action on="Load"><![CDATA[
// Seek through this group of buttons (determining length from last object's name).
max = this.name.substring (this.name.lastIndexOf ("_")+1, this.name.length);
for (loop = 1; loop <= max; loop++)
{
// Get name of current object in group.
tempName = this.name.substring (0, this.name.lastIndexOf ("_")+1) + loop;
// Create coordinates for object (the actual coordinates are refreshed when the
// resource is updated, so at this point we don't sweat that they have the same
// coordinates).
addCrds (tempName, 50, 0, -200, 4,
snConst.MiniIcon.Width+54, 32);
}
]]></action>
</object>
<object name="snResourceCounterIcon_1"
style="snResourceIcon"
type="button"
/>
<object name="snResourceCounterIcon_2"
style="snResourceIcon"
type="button"
/>
<object name="snResourceCounterIcon_3"
style="snResourceIcon"
type="button"
/>
<object name="snResourceCounterIcon_4"
style="snResourceIcon"
type="button"
/>
<object name="snResourceCounterIcon_5"
style="snResourceIcon"
type="button"
>
<action on="Load"><![CDATA[
// Seek through this group of buttons (determining length from last object's name).
max = this.name.substring (this.name.lastIndexOf ("_")+1, this.name.length);
for (loop = 1; loop <= max; loop++)
{
// Get name of current object in group.
tempName = this.name.substring (0, this.name.lastIndexOf ("_")+1) + loop;
// Create coordinates for object (the actual coordinates are refreshed when the
// resource is updated, so at this point we don't sweat that they have the same
// coordinates).
addCrds (tempName, 50, 0, -200, 4,
32, 32);
}
]]></action>
</object>
</object>
<!-- GROUP: STATUS PANE -->
<object name="snStatusPane"
hotkey="session.statuspane.toggle"
>
<action on="Press"><![CDATA[
guiToggle (this.name);
]]></action>
<!-- STATUS PANE -->
<object name="snStatusPaneBkg"
style="snStatusPane"
type="image"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 100, 0, 0, 256, 128);
addCrd (this.name, lb, 100, 100);
addCrd (this.name, lt, 100, 0);
addCrd (this.name, rt, 0, 0);
]]></action>
<object name="snStatusPaneEmblem"
style="snStatusPane"
type="image"
z="10"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneBkg");
addCrds (this.name, 0, 0, currCrd.coord[rb].x, currCrd.coord[rb].y,
currCrd.coord[rb].width, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPanePortrait"
style="snPortrait"
type="button"
hotkey="selection.snap"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 0, 7, 11,
snConst.Portrait.Lrg.Width, snConst.Portrait.Lrg.Height);
addCrd (this.name, lb, 100, 100);
addCrd (this.name, lt, 100, 0);
addCrd (this.name, rt, 0, 0);
]]></action>
<action on="Press"><![CDATA[
// Focus the camera on the unit when his portrait is clicked.
if (selection[0].position)
setCameraTarget(selection[0].position);
]]></action>
</object>
<object name="snStatusPaneRank"
style="snObject"
type="text"
sprite="snIconSheetRank"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPanePortrait");
addCrds (this.name, 0, 0, currCrd.coord[rb].x,
currCrd.coord[rb].y, 25, 25);
]]></action>
</object>
<object name="snStatusPaneHealthBar"
style="snGreenBar"
type="progressbar"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPanePortrait");
addCrds (this.name, 0, 0, currCrd.coord[rb].x+1,
currCrd.coord[rb].y+currCrd.coord[rb].height+3, 35, 8);
]]></action>
</object>
<object name="snStatusPaneStaminaBar"
style="snBlueBar"
type="progressbar"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneHealthBar");
addCrds (this.name, 0, 0, currCrd.coord[rb].x,
currCrd.coord[rb].y+currCrd.coord[rb].height, currCrd.coord[rb].width, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPaneHealthBarText"
style="snObject"
type="text"
text_align="left"
text_valign="center"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneHealthBar");
currCrd2 = getCrd ("snStatusPanePortrait");
addCrds (this.name, 0, 0, currCrd.coord[rb].x+currCrd.coord[rb].width, currCrd.coord[rb].y, currCrd2.coord[rb].width-currCrd.coord[rb].width-2, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPaneStaminaBarText"
style="snObject"
type="text"
text_align="left"
text_valign="center"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneHealthBarText");
currCrd2 = getCrd ("snStatusPaneStaminaBar");
addCrds (this.name, 0, 0, currCrd.coord[rb].x, currCrd2.coord[rb].y, currCrd.coord[rb].width, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPaneText"
style="snObject"
type="text"
buffer_zone="5"
text_align="left"
text_valign="top"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPanePortrait");
addCrds (this.name, 0, 0, currCrd.coord[rb].x+currCrd.coord[rb].width+3,
currCrd.coord[rb].y-1, 190, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPaneSupplyIcon"
style="snObject"
type="text"
cell_id="0"
sprite="snIconSheetResource"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneText");
addCrds (this.name, 0, 0, currCrd.coord[rb].x,
currCrd.coord[rb].y+currCrd.coord[rb].height+2, 20, 20);
]]></action>
</object>
<object name="snStatusPaneSupply"
style="snObject"
type="text"
sprite="bkDarkGrayBorderBlack"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneSupplyIcon");
addCrds (this.name, 0, 0, currCrd.coord[rb].x+currCrd.coord[rb].width,
currCrd.coord[rb].y, 64, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPaneGarrisonIcon"
style="snObject"
type="text"
cell_id="0"
sprite="snIconSheetGarrison"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneSupply");
currCrd2 = getCrd ("snStatusPaneSupplyIcon");
addCrds (this.name, 0, 0, currCrd.coord[rb].x+currCrd.coord[rb].width,
currCrd.coord[rb].y, currCrd2.coord[rb].width, currCrd.coord[rb].height);
]]></action>
</object>
<object name="snStatusPaneGarrison"
style="snObject"
type="text"
sprite="bkDarkGrayBorderBlack"
>
<action on="Load"><![CDATA[
currCrd = getCrd ("snStatusPaneSupply");
currCrd2 = getCrd ("snStatusPaneGarrisonIcon");
addCrds (this.name, 0, 0, currCrd2.coord[rb].x+currCrd2.coord[rb].width, currCrd2.coord[rb].y, currCrd.coord[rb].width, currCrd.coord[rb].height);
]]></action>
</object>
</object>
<!-- COMMAND BUTTONS (arc the Status Pane) -->
<object name="snStatusPaneCommand1_1"
style="snPortrait"
type="button"
z="100"
>
</object>
<object name="snStatusPaneCommandGroup1" >
<object style="snPortrait" type="button" name="snStatusPaneCommand1_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand1_12" />
</object>
<object name="snStatusPaneCommand2_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup2" >
<object style="snPortrait" type="button" name="snStatusPaneCommand2_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand2_12" />
</object>
<object name="snStatusPaneCommand3_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup3" >
<object style="snPortrait" type="button" name="snStatusPaneCommand3_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand3_12" />
</object>
<object name="snStatusPaneCommand4_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup4" >
<object style="snPortrait" type="button" name="snStatusPaneCommand4_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand4_12" />
</object>
<object name="snStatusPaneCommand5_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup5" >
<object style="snPortrait" type="button" name="snStatusPaneCommand5_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand5_12" />
</object>
<object name="snStatusPaneCommand6_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup6" >
<object style="snPortrait" type="button" name="snStatusPaneCommand6_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand6_12" />
</object>
<object name="snStatusPaneCommand7_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup7" >
<object style="snPortrait" type="button" name="snStatusPaneCommand7_2" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_3" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_4" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_5" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_6" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_7" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_8" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_9" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_10" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_11" />
<object style="snPortrait" type="button" name="snStatusPaneCommand7_12" />
</object>
<object name="snStatusPaneCommand8_1"
style="snPortrait"
type="button"
z="100"
/>
<object name="snStatusPaneCommandGroup8" >
<object style="snPortrait" type="button" name="snStatusPaneCommand8_2">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_2Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_3">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_3Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_4">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_4Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_5">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_5Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_6">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_6Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_7">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_7Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_8">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_8Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_9">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_9Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_10">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_10Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_11">
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_11Bar" />
</object>
<object style="snPortrait" type="button" name="snStatusPaneCommand8_12"
>
<object style="snGreenBar" type="progressbar" name="snStatusPaneCommand8_12Bar" />
<action on="Load"><![CDATA[
defineCommandButtons(this.name);
]]></action>
</object>
</object>
<!--
<object name="snStatusPaneCommandProgress"
style="snPortraitProgress"
type="progressbar"
hidden="true"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb, 0, 100,
getCrd ("snStatusPaneBkg").coord[rb].x
+getCrd ("snStatusPaneBkg").coord[rb].width,
getCrd ("snStatusPaneBkg").coord[rb].y+getCrd ("snStatusPaneBkg").coord[rb].height,
snConst.Portrait.Sml.Width, snConst.Portrait.Sml.Height);
addCrd (this.name, lb, 100, 100);
addCrd (this.name, lt, 100, 0);
addCrd (this.name, rt, 0, 0);
]]></action>
</object>
-->
</object>
</object>
</objects>