1
0
forked from 0ad/0ad

Implemented population of command buttons.

This was SVN commit r1461.
This commit is contained in:
Acumen 2004-12-06 00:54:06 +00:00
parent a2a6f29ab3
commit 7e7743a90d
51 changed files with 499 additions and 38 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -29,6 +29,10 @@
</Traits>
<Footprint Radius="1.5"/>
<Actions>
<Gather
food="true"
food.meat="2"
/>
<Move
speed="8.0"
turningRadius="1.0"

View File

@ -27,4 +27,19 @@
req="600"
/>
</Traits>
<Actions>
<Gather
food="true"
food.meat="1"
food.fruit="1"
food.grain="1"
food.fish="1"
wood="1"
stone="1"
ore="1"
/>
<Repair
rate="1"
/>
</Actions>
</Entity>

View File

@ -8,4 +8,16 @@
icon_cell="33"
/>
</Traits>
<Actions>
<Gather
food="true"
food.meat="2"
food.fruit="2"
food.grain="2"
food.fish="2"
/>
<Repair
rate="0.5"
/>
</Actions>
</Entity>

View File

@ -720,7 +720,7 @@
</object>
<!-- PRIMARY COMMAND BUTTONS (arcs the Status Orb) -->
<object type="button" name="session_panel_status_command_pri_1" style="portrait" textcolor="255 255 255" z="70" hidden="false">1
<object type="button" name="session_panel_status_command_pri_1" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_1_x, crd_status_orb_command_1_y, crd_status_orb_command_1_x+crd_status_orb_command_1_width, crd_status_orb_command_1_y+crd_status_orb_command_1_height, left_screen, top_screen, left_screen, top_screen,
@ -830,7 +830,7 @@
</object>
</object>
<object type="button" name="session_panel_status_command_pri_2" style="portrait" textcolor="255 255 255" z="70" hidden="false">2
<object type="button" name="session_panel_status_command_pri_2" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_2_x, crd_status_orb_command_2_y, crd_status_orb_command_2_x+crd_status_orb_command_2_width, crd_status_orb_command_2_y+crd_status_orb_command_2_height, left_screen, top_screen, left_screen, top_screen,
@ -940,7 +940,7 @@
</object>
</object>
<object type="button" name="session_panel_status_command_pri_3" style="portrait" textcolor="255 255 255" z="70" hidden="false">3
<object type="button" name="session_panel_status_command_pri_3" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_3_x, crd_status_orb_command_3_y, crd_status_orb_command_3_x+crd_status_orb_command_3_width, crd_status_orb_command_3_y+crd_status_orb_command_3_height, left_screen, top_screen, left_screen, top_screen,
@ -1050,7 +1050,7 @@
</object>
</object>
<object type="button" name="session_panel_status_command_pri_4" style="portrait" textcolor="255 255 255" z="70" hidden="false">4
<object type="button" name="session_panel_status_command_pri_4" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_4_x, crd_status_orb_command_4_y, crd_status_orb_command_4_x+crd_status_orb_command_4_width, crd_status_orb_command_4_y+crd_status_orb_command_4_height, left_screen, top_screen, left_screen, top_screen,
@ -1160,7 +1160,7 @@
</object>
</object>
<object type="button" name="session_panel_status_command_pri_5" style="portrait" textcolor="255 255 255" z="70" hidden="false">5
<object type="button" name="session_panel_status_command_pri_5" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_x, crd_status_orb_command_5_y, crd_status_orb_command_5_x+crd_status_orb_command_5_width, crd_status_orb_command_5_y+crd_status_orb_command_5_height, left_screen, top_screen, left_screen, top_screen,
@ -1168,7 +1168,106 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_6" style="portrait" textcolor="255 255 255" z="70" hidden="false">6
<object type="empty" name="session_panel_status_command_pri_5_group" size="0 0 100% 100%" z="1" hidden="false">
<object type="button" name="session_panel_status_command_pri_5_1" style="portrait" textcolor="255 255 255" z="70" hidden="false">1
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_1_x, crd_status_orb_command_5_1_y, crd_status_orb_command_5_1_x+crd_status_orb_command_5_1_width, crd_status_orb_command_5_1_y+crd_status_orb_command_5_1_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_1_x, -crd_status_orb_command_5_1_y-crd_status_orb_command_5_1_height, crd_status_orb_command_5_1_x+crd_status_orb_command_5_1_width, -crd_status_orb_command_5_1_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_2" style="portrait" textcolor="255 255 255" z="70" hidden="false">2
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_2_x, crd_status_orb_command_5_2_y, crd_status_orb_command_5_2_x+crd_status_orb_command_5_2_width, crd_status_orb_command_5_2_y+crd_status_orb_command_5_2_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_2_x, -crd_status_orb_command_5_2_y-crd_status_orb_command_5_2_height, crd_status_orb_command_5_2_x+crd_status_orb_command_5_2_width, -crd_status_orb_command_5_2_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_3" style="portrait" textcolor="255 255 255" z="70" hidden="false">3
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_3_x, crd_status_orb_command_5_3_y, crd_status_orb_command_5_3_x+crd_status_orb_command_5_3_width, crd_status_orb_command_5_3_y+crd_status_orb_command_5_3_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_3_x, -crd_status_orb_command_5_3_y-crd_status_orb_command_5_3_height, crd_status_orb_command_5_3_x+crd_status_orb_command_5_3_width, -crd_status_orb_command_5_3_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_4" style="portrait" textcolor="255 255 255" z="70" hidden="false">4
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_4_x, crd_status_orb_command_5_4_y, crd_status_orb_command_5_4_x+crd_status_orb_command_5_4_width, crd_status_orb_command_5_4_y+crd_status_orb_command_5_4_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_4_x, -crd_status_orb_command_5_4_y-crd_status_orb_command_5_4_height, crd_status_orb_command_5_4_x+crd_status_orb_command_5_4_width, -crd_status_orb_command_5_4_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_5" style="portrait" textcolor="255 255 255" z="70" hidden="false">5
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_5_x, crd_status_orb_command_5_5_y, crd_status_orb_command_5_5_x+crd_status_orb_command_5_5_width, crd_status_orb_command_5_5_y+crd_status_orb_command_5_5_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_5_x, -crd_status_orb_command_5_5_y-crd_status_orb_command_5_5_height, crd_status_orb_command_5_5_x+crd_status_orb_command_5_5_width, -crd_status_orb_command_5_5_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_6" style="portrait" textcolor="255 255 255" z="70" hidden="false">6
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_6_x, crd_status_orb_command_5_6_y, crd_status_orb_command_5_6_x+crd_status_orb_command_5_6_width, crd_status_orb_command_5_6_y+crd_status_orb_command_5_6_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_6_x, -crd_status_orb_command_5_6_y-crd_status_orb_command_5_6_height, crd_status_orb_command_5_6_x+crd_status_orb_command_5_6_width, -crd_status_orb_command_5_6_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_7" style="portrait" textcolor="255 255 255" z="70" hidden="false">7
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_7_x, crd_status_orb_command_5_7_y, crd_status_orb_command_5_7_x+crd_status_orb_command_5_7_width, crd_status_orb_command_5_7_y+crd_status_orb_command_5_7_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_7_x, -crd_status_orb_command_5_7_y-crd_status_orb_command_5_7_height, crd_status_orb_command_5_7_x+crd_status_orb_command_5_7_width, -crd_status_orb_command_5_7_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_8" style="portrait" textcolor="255 255 255" z="70" hidden="false">8
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_8_x, crd_status_orb_command_5_8_y, crd_status_orb_command_5_8_x+crd_status_orb_command_5_8_width, crd_status_orb_command_5_8_y+crd_status_orb_command_5_8_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_8_x, -crd_status_orb_command_5_8_y-crd_status_orb_command_5_8_height, crd_status_orb_command_5_8_x+crd_status_orb_command_5_8_width, -crd_status_orb_command_5_8_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_9" style="portrait" textcolor="255 255 255" z="70" hidden="false">9
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_9_x, crd_status_orb_command_5_9_y, crd_status_orb_command_5_9_x+crd_status_orb_command_5_9_width, crd_status_orb_command_5_9_y+crd_status_orb_command_5_9_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_9_x, -crd_status_orb_command_5_9_y-crd_status_orb_command_5_9_height, crd_status_orb_command_5_9_x+crd_status_orb_command_5_9_width, -crd_status_orb_command_5_9_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_10" style="portrait" textcolor="255 255 255" z="70" hidden="false">10
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_10_x, crd_status_orb_command_5_10_y, crd_status_orb_command_5_10_x+crd_status_orb_command_5_10_width, crd_status_orb_command_5_10_y+crd_status_orb_command_5_10_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_10_x, -crd_status_orb_command_5_10_y-crd_status_orb_command_5_10_height, crd_status_orb_command_5_10_x+crd_status_orb_command_5_10_width, -crd_status_orb_command_5_10_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_11" style="portrait" textcolor="255 255 255" z="70" hidden="false">11
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_11_x, crd_status_orb_command_5_11_y, crd_status_orb_command_5_11_x+crd_status_orb_command_5_11_width, crd_status_orb_command_5_11_y+crd_status_orb_command_5_11_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_11_x, -crd_status_orb_command_5_11_y-crd_status_orb_command_5_11_height, crd_status_orb_command_5_11_x+crd_status_orb_command_5_11_width, -crd_status_orb_command_5_11_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_5_12" style="portrait" textcolor="255 255 255" z="70" hidden="false">12
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_5_12_x, crd_status_orb_command_5_12_y, crd_status_orb_command_5_12_x+crd_status_orb_command_5_12_width, crd_status_orb_command_5_12_y+crd_status_orb_command_5_12_height, left_screen, top_screen, left_screen, top_screen,
crd_status_orb_command_5_12_x, -crd_status_orb_command_5_12_y-crd_status_orb_command_5_12_height, crd_status_orb_command_5_12_x+crd_status_orb_command_5_12_width, -crd_status_orb_command_5_12_y, left_screen, bottom_screen, left_screen, bottom_screen);
]]></action>
</object>
</object>
<object type="button" name="session_panel_status_command_pri_6" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_6_x, crd_status_orb_command_6_y, crd_status_orb_command_6_x+crd_status_orb_command_6_width, crd_status_orb_command_6_y+crd_status_orb_command_6_height, left_screen, top_screen, left_screen, top_screen,
@ -1176,7 +1275,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_7" style="portrait" textcolor="255 255 255" z="70" hidden="false">7
<object type="button" name="session_panel_status_command_pri_7" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_7_x, crd_status_orb_command_7_y, crd_status_orb_command_7_x+crd_status_orb_command_7_width, crd_status_orb_command_7_y+crd_status_orb_command_7_height, left_screen, top_screen, left_screen, top_screen,
@ -1184,7 +1283,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_8" style="portrait" textcolor="255 255 255" z="70" hidden="false">8
<object type="button" name="session_panel_status_command_pri_8" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_8_x, crd_status_orb_command_8_y, crd_status_orb_command_8_x+crd_status_orb_command_8_width, crd_status_orb_command_8_y+crd_status_orb_command_8_height, left_screen, top_screen, left_screen, top_screen,
@ -1192,7 +1291,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_9" style="portrait" textcolor="255 255 255" z="70" hidden="false">9
<object type="button" name="session_panel_status_command_pri_9" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_9_x, crd_status_orb_command_9_y, crd_status_orb_command_9_x+crd_status_orb_command_9_width, crd_status_orb_command_9_y+crd_status_orb_command_9_height, left_screen, top_screen, left_screen, top_screen,
@ -1200,7 +1299,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_10" style="portrait" textcolor="255 255 255" z="70" hidden="false">10
<object type="button" name="session_panel_status_command_pri_10" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_10_x, crd_status_orb_command_10_y, crd_status_orb_command_10_x+crd_status_orb_command_10_width, crd_status_orb_command_10_y+crd_status_orb_command_10_height, left_screen, top_screen, left_screen, top_screen,
@ -1208,7 +1307,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_11" style="portrait" textcolor="255 255 255" z="70" hidden="false">11
<object type="button" name="session_panel_status_command_pri_11" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_11_x, crd_status_orb_command_11_y, crd_status_orb_command_11_x+crd_status_orb_command_11_width, crd_status_orb_command_11_y+crd_status_orb_command_11_height, left_screen, top_screen, left_screen, top_screen,
@ -1216,7 +1315,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_12" style="portrait" textcolor="255 255 255" z="70" hidden="false">12
<object type="button" name="session_panel_status_command_pri_12" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_12_x, crd_status_orb_command_12_y, crd_status_orb_command_12_x+crd_status_orb_command_12_width, crd_status_orb_command_12_y+crd_status_orb_command_12_height, left_screen, top_screen, left_screen, top_screen,
@ -1224,7 +1323,7 @@
]]></action>
</object>
<object type="button" name="session_panel_status_command_pri_13" style="portrait" textcolor="255 255 255" z="70" hidden="false">13
<object type="button" name="session_panel_status_command_pri_13" style="portrait" textcolor="255 255 255" z="70" hidden="false">
<action on="Load"><![CDATA[
AddSizeCoord(this.name,
crd_status_orb_command_13_x, crd_status_orb_command_13_y, crd_status_orb_command_13_x+crd_status_orb_command_13_width, crd_status_orb_command_13_y+crd_status_orb_command_13_height, left_screen, top_screen, left_screen, top_screen,
@ -1232,8 +1331,6 @@
]]></action>
</object>
<!-- SECONDARY COMMAND BUTTONS (arcs the Primary Command Buttons) -->
<!-- / GROUP: STATUS ORB -->
</object>

View File

@ -78,7 +78,9 @@ function initStatusOrb()
crd_status_orb_stat3_y = crd_status_orb_stat2_y+crd_status_orb_stat2_height;
// Command Button 1.
command_sub_max = 12; // Maximum number of entries in command button list.
command_sub_max = 12; // Maximum number of entries in a command button list.
command_list_max = 5; // The maximum number of command button lists.
command_max = 13; // Maximum number of command buttons.
crd_status_orb_command_1_width = crd_portrait_sml_width;
crd_status_orb_command_1_height = crd_portrait_sml_height;
crd_status_orb_command_1_x = 0;
@ -397,6 +399,78 @@ function initStatusOrb()
crd_status_orb_command_5_x = crd_status_orb_command_4_x+crd_status_orb_command_4_width+crd_status_orb_command_span;
crd_status_orb_command_5_y = crd_status_orb_command_4_y;
// Command Button 5_1.
crd_status_orb_command_5_1_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_1_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_1_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_1_y = crd_status_orb_command_5_y+crd_status_orb_command_5_height+crd_status_orb_command_span;
// Command Button 5_2.
crd_status_orb_command_5_2_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_2_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_2_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_2_y = crd_status_orb_command_5_1_y+crd_status_orb_command_5_1_height+crd_status_orb_command_span;
// Command Button 5_3.
crd_status_orb_command_5_3_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_3_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_3_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_3_y = crd_status_orb_command_5_2_y+crd_status_orb_command_5_2_height+crd_status_orb_command_span;
// Command Button 5_4.
crd_status_orb_command_5_4_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_4_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_4_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_4_y = crd_status_orb_command_5_3_y+crd_status_orb_command_5_3_height+crd_status_orb_command_span;
// Command Button 5_5.
crd_status_orb_command_5_5_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_5_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_5_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_5_y = crd_status_orb_command_5_4_y+crd_status_orb_command_5_4_height+crd_status_orb_command_span;
// Command Button 5_6.
crd_status_orb_command_5_6_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_6_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_6_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_6_y = crd_status_orb_command_5_5_y+crd_status_orb_command_5_5_height+crd_status_orb_command_span;
// Command Button 5_7.
crd_status_orb_command_5_7_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_7_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_7_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_7_y = crd_status_orb_command_5_6_y+crd_status_orb_command_5_6_height+crd_status_orb_command_span;
// Command Button 5_8.
crd_status_orb_command_5_8_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_8_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_8_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_8_y = crd_status_orb_command_5_7_y+crd_status_orb_command_5_7_height+crd_status_orb_command_span;
// Command Button 5_9.
crd_status_orb_command_5_9_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_9_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_9_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_9_y = crd_status_orb_command_5_8_y+crd_status_orb_command_5_8_height+crd_status_orb_command_span;
// Command Button 5_10.
crd_status_orb_command_5_10_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_10_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_10_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_10_y = crd_status_orb_command_5_9_y+crd_status_orb_command_5_9_height+crd_status_orb_command_span;
// Command Button 5_11.
crd_status_orb_command_5_11_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_11_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_11_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_11_y = crd_status_orb_command_5_10_y+crd_status_orb_command_5_10_height+crd_status_orb_command_span;
// Command Button 5_12.
crd_status_orb_command_5_12_width = crd_status_orb_command_5_width;
crd_status_orb_command_5_12_height = crd_status_orb_command_5_height;
crd_status_orb_command_5_12_x = crd_status_orb_command_5_x;
crd_status_orb_command_5_12_y = crd_status_orb_command_5_11_y+crd_status_orb_command_5_11_height+crd_status_orb_command_span;
// Command Button 6.
crd_status_orb_command_6_width = crd_status_orb_command_1_width;
crd_status_orb_command_6_height = crd_status_orb_command_1_height;
@ -496,22 +570,75 @@ function UpdateList(listIcon, listCol)
setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon + "_" + getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell);
else
setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon);
getGUIObjectByName("session_panel_status_command_pri_" + listCol + "_" + createLoop).hidden = false;
GUIObjectUnhide("session_panel_status_command_pri_" + listCol + "_" + createLoop);
}
else
getGUIObjectByName("session_panel_status_command_pri_" + listCol + "_" + createLoop).hidden = true;
GUIObjectHide("session_panel_status_command_pri_" + listCol + "_" + createLoop);
}
return listArray;
}
}
else
{
// Hide the whole column.
GUIObjectHide("session_panel_status_command_pri_" + listCol);
GUIObjectHide("session_panel_status_command_pri_" + listCol + "_group");
return 0;
}
// ====================================================================
function UpdateCommand(listIcon, listCol)
{
// Similar to UpdateList, but without the list.
// Updates a particular command button with a particular action.
if (
(listIcon == "action_attack" && selection[0].actions.attack)
|| (listIcon == "action_patrol" && selection[0].actions.patrol)
|| (listIcon == "action_repair" && selection[0].actions.repair)
|| (listIcon == "action_gather_food" && selection[0].actions.gather && selection[0].actions.gather.food)
|| (listIcon == "action_gather_wood" && selection[0].actions.gather && selection[0].actions.gather.wood)
|| (listIcon == "action_gather_stone" && selection[0].actions.gather && selection[0].actions.gather.stone)
|| (listIcon == "action_gather_ore" && selection[0].actions.gather && selection[0].actions.gather.ore)
)
{
setPortrait("session_panel_status_command_pri_" + listCol, listIcon);
GUIObjectUnhide("session_panel_status_command_pri_" + listCol);
return (listCol-1);
}
else
return (listCol);
}
// ====================================================================
function UpdateCommandButtons()
{
// Update train/research/build lists.
listCounter = 1;
unitArray = UpdateList("tab_train", listCounter); if (unitArray != "0") listCounter++;
structcivArray = UpdateList("tab_buildciv", listCounter); if (structcivArray != "0") listCounter++;
structmilArray = UpdateList("tab_buildmil", listCounter); if (structmilArray != "0") listCounter++;
techArray = UpdateList("tab_research", listCounter); if (techArray != "0") listCounter++;
formationArray = UpdateList("tab_formation", listCounter); if (formationArray != "0") listCounter++;
behaviourArray = UpdateList("tab_behaviour", listCounter); if (behaviourArray != "0") listCounter++;
// Update commands.
commandCounter = command_max;
commandCounter = UpdateCommand("action_attack", commandCounter);
commandCounter = UpdateCommand("action_patrol", commandCounter);
commandCounter = UpdateCommand("action_repair", commandCounter);
commandCounter = UpdateCommand("action_gather_food", commandCounter);
commandCounter = UpdateCommand("action_gather_wood", commandCounter);
commandCounter = UpdateCommand("action_gather_stone", commandCounter);
commandCounter = UpdateCommand("action_gather_ore", commandCounter);
// Clear remaining buttons between them.
for (commandClearLoop = listCounter; commandClearLoop <= commandCounter; commandClearLoop++)
{
GUIObjectHide("session_panel_status_command_pri_" + commandClearLoop);
// If this slot could possibly contain a list, hide that too.
if (commandClearLoop <= command_list_max)
GUIObjectHide("session_panel_status_command_pri_" + commandClearLoop + "_group");
}
}
@ -660,10 +787,7 @@ function UpdateStatusOrb()
// Reveal Status Orb
getGUIObjectByName("session_status_orb").hidden = false;
// Update train/research/build lists.
unitArray = UpdateList("tab_train", 1);
structcivArray = UpdateList("tab_buildciv", 2);
structmilArray = UpdateList("tab_buildmil", 3);
techArray = UpdateList("tab_research", 4);
// Update Command Buttons.
UpdateCommandButtons();
}

View File

@ -62,6 +62,7 @@
<icon name="icon_statistic_hack" texture="statistic_hack" size="20 20" />
<icon name="icon_statistic_los" texture="statistic_los" size="20 20" />
<icon name="icon_statistic_pierce" texture="statistic_pierce" size="20 20" />
<icon name="icon_statistic_range" texture="statistic_accuracy" size="20 20" />
<icon name="icon_statistic_speed" texture="statistic_speed" size="20 20" />
<!-- Generic Icons / malte, 15th nov -->

View File

@ -398,7 +398,7 @@
</sprite>
<sprite name="statistic_range">
<image texture="ui_icon_statistic_accuracy_20.png" texture-size="0 0 32 32" size="0 0 100% 100%" />
<image texture="ui_icon_statistic_range_20.png" texture-size="0 0 32 32" size="0 0 100% 100%" />
</sprite>
<sprite name="statistic_speed">
@ -477,6 +477,100 @@
<image texture="ui_portrait_tab_behaviour_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!--
==========================================
ACTION PORTRAITS
==========================================
-->
<!-- Attack Action portrait. -->
<sprite name="ui_portrait_action_attack_64">
<image texture="ui_portrait_action_attack_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_attack_64-lit">
<image texture="ui_portrait_action_attack_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_attack_64-grey">
<image texture="ui_portrait_action_attack_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Build Action portrait. -->
<sprite name="ui_portrait_action_build_64">
<image texture="ui_portrait_action_attack_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_build_64-lit">
<image texture="ui_portrait_action_attack_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_build_64-grey">
<image texture="ui_portrait_action_attack_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Gather Food Action portrait. -->
<sprite name="ui_portrait_action_gather_food_64">
<image texture="ui_portrait_action_gather_food_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_gather_food_64-lit">
<image texture="ui_portrait_action_gather_food_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_gather_food_64-grey">
<image texture="ui_portrait_action_gather_food_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Gather Ore Action portrait. -->
<sprite name="ui_portrait_action_gather_ore_64">
<image texture="ui_portrait_action_gather_ore_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_gather_ore_64-lit">
<image texture="ui_portrait_action_gather_ore_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_gather_ore_64-grey">
<image texture="ui_portrait_action_gather_ore_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Gather Stone Action portrait. -->
<sprite name="ui_portrait_action_gather_stone_64">
<image texture="ui_portrait_action_gather_stone_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_gather_stone_64-lit">
<image texture="ui_portrait_action_gather_stone_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_gather_stone_64-grey">
<image texture="ui_portrait_action_gather_stone_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Gather Wood Action portrait. -->
<sprite name="ui_portrait_action_gather_wood_64">
<image texture="ui_portrait_action_gather_wood_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_gather_wood_64-lit">
<image texture="ui_portrait_action_gather_wood_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_gather_wood_64-grey">
<image texture="ui_portrait_action_gather_wood_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Patrol Action portrait. -->
<sprite name="ui_portrait_action_patrol_64">
<image texture="ui_portrait_action_patrol_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_patrol_64-lit">
<image texture="ui_portrait_action_patrol_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_patrol_64-grey">
<image texture="ui_portrait_action_patrol_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!-- Repair Action portrait. -->
<sprite name="ui_portrait_action_repair_64">
<image texture="ui_portrait_action_repair_64.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_action_repair_64-lit">
<image texture="ui_portrait_action_repair_64-lit.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<sprite name="ui_portrait_tab_action_repair_64-grey">
<image texture="ui_portrait_action_repair_64-grey.png" texture-size="0 0 100% 100%" size="0 0 100% 100%" />
</sprite>
<!--
==========================================
ENTITY SINGLE PORTRAITS