Updated GUI to revise Group Pane and do some other cleanup stuff.
This was SVN commit r1327.
This commit is contained in:
parent
ae6baf5134
commit
751cf46d2e
@ -10,6 +10,7 @@
|
||||
==========================================
|
||||
-->
|
||||
|
||||
<!-- Generic utilities -->
|
||||
<script file="gui/test/functions_utility_object.js"><![CDATA[
|
||||
]]></script>
|
||||
|
||||
@ -38,9 +39,16 @@
|
||||
<script file="gui/test/functions_global.js"><![CDATA[
|
||||
]]></script>
|
||||
|
||||
<!-- Game Session GUI -->
|
||||
<script file="gui/test/functions_session_coord.js"><![CDATA[
|
||||
]]></script>
|
||||
|
||||
<script file="gui/test/functions_session_group_pane.js"><![CDATA[
|
||||
]]></script>
|
||||
|
||||
<script file="gui/test/functions_session_status_orb.js"><![CDATA[
|
||||
]]></script>
|
||||
|
||||
<script file="gui/test/functions_session.js"><![CDATA[
|
||||
initSession();
|
||||
]]></script>
|
||||
|
@ -24,13 +24,8 @@
|
||||
GUIObjectToggle("session_group_pane");
|
||||
]]></action>
|
||||
|
||||
<object type="text" name="session_group_pane_bg" sprite="tooltip-background" z="60" ghost="true" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"0%+20 0% 100%-20 0%+127",
|
||||
"0%+20 100%-127 100%-20 100%");
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="text" name="session_group_pane_bg" sprite="tooltip-background" z="60" ghost="true" hidden="false"/>
|
||||
|
||||
<!-- First row. -->
|
||||
<object type="button" name="session_group_pane_portrait_1" style="portrait" z="60" hidden="false">1
|
||||
<action on="Load"><![CDATA[
|
||||
@ -54,526 +49,439 @@
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_3" style="portrait" z="60" hidden="false">3
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+20 32 50%+52 64",
|
||||
"50%+20 100%-70 50%+52 100%-38");
|
||||
AddSizeGroupPane(this.name, 0, 2);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_3_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+20 66 50%+52 70",
|
||||
"50%+20 100%-36 50%+52 100%-32");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_4" style="portrait" z="60" hidden="false">4
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-88 32 50%-56 64",
|
||||
"50%-88 100%-70 50%-56 100%-38");
|
||||
AddSizeGroupPane(this.name, 0, 3);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_4_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-88 66 50%-56 70",
|
||||
"50%-88 100%-36 50%-56 100%-32");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_5" style="portrait" z="60" hidden="false">5
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+56 32 50%+88 64",
|
||||
"50%+56 100%-70 50%+88 100%-38");
|
||||
AddSizeGroupPane(this.name, 0, 4);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_5_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+56 66 50%+88 70",
|
||||
"50%+56 100%-36 50%+88 100%-32");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_6" style="portrait" z="60" hidden="false">6
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-124 32 50%-92 64",
|
||||
"50%-124 100%-70 50%-92 100%-38");
|
||||
AddSizeGroupPane(this.name, 0, 5);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_6_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-124 66 50%-92 70",
|
||||
"50%-124 100%-36 50%-92 100%-32");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_7" style="portrait" z="60" hidden="false">7
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+92 32 50%+124 64",
|
||||
"50%+92 100%-70 50%+124 100%-38");
|
||||
AddSizeGroupPane(this.name, 0, 6);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_7_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+92 66 50%+124 70",
|
||||
"50%+92 100%-36 50%+124 100%-32");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_8" style="portrait" z="60" hidden="false">8
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-160 32 50%-128 64",
|
||||
"50%-160 100%-70 50%-128 100%-38");
|
||||
AddSizeGroupPane(this.name, 0, 7);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_8_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-160 66 50%-128 70",
|
||||
"50%-160 100%-36 50%-128 100%-32");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_9" style="portrait" z="60" hidden="false">9
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+128 32 50%+160 64",
|
||||
"50%+128 100%-64 50%+160 100%-32");
|
||||
AddSizeGroupPane(this.name, 0, 8);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_9_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+128 66 50%+160 70",
|
||||
"50%+128 100%-70 50%+160 100%-66");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_10" style="portrait" z="60" hidden="false">10
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-196 32 50%-164 64",
|
||||
"50%-196 100%-64 50%-164 100%-32");
|
||||
AddSizeGroupPane(this.name, 0, 9);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_10_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-196 66 50%-164 70",
|
||||
"50%-196 100%-70 50%-164 100%-66");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_11" style="portrait" z="60" hidden="false">11
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+164 32 50%+192 64",
|
||||
"50%+164 100%-64 50%+192 100%-32");
|
||||
AddSizeGroupPane(this.name, 0, 10);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_11_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+164 66 50%+192 70",
|
||||
"50%+164 100%-70 50%+192 100%-66");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_12" style="portrait" z="60" hidden="false">12
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-232 32 50%-200 64",
|
||||
"50%-232 100%-64 50%-200 100%-32");
|
||||
AddSizeGroupPane(this.name, 0, 11);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_12_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-232 66 50%-200 70",
|
||||
"50%-232 100%-70 50%-200 100%-66");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_13" style="portrait" z="60" hidden="false">13
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+200 32 50%+232 64",
|
||||
"50%+200 100%-64 50%+232 100%-32");
|
||||
AddSizeGroupPane(this.name, 0, 12);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_13_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+200 66 50%+232 70",
|
||||
"50%+200 100%-70 50%+232 100%-66");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
<!-- Second row. -->
|
||||
<object type="button" name="session_group_pane_portrait_14" style="portrait" z="60" hidden="false">14
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-16 78 50%+16 110",
|
||||
"50%-16 100%-110 50%+16 100%-78");
|
||||
AddSizeGroupPane(this.name, 0, 13);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_14_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-16 112 50%+16 116",
|
||||
"50%-16 100%-116 50%+16 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_15" style="portrait" z="60" hidden="false">15
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-52 78 50%-20 110",
|
||||
"50%-52 100%-110 50%-20 100%-78");
|
||||
AddSizeGroupPane(this.name, 0, 14);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_15_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-52 112 50%-20 116",
|
||||
"50%-52 100%-116 50%-20 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
<!-- Second row. -->
|
||||
<object type="button" name="session_group_pane_portrait_16" style="portrait" z="60" hidden="false">16
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+20 78 50%+52 110",
|
||||
"50%+20 100%-110 50%+52 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 0);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_16_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_16_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+20 112 50%+52 116",
|
||||
"50%+20 100%-116 50%+52 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_17" style="portrait" z="60" hidden="false">17
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-88 78 50%-56 110",
|
||||
"50%-88 100%-110 50%-56 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 1);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_17_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_17_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-88 112 50%-56 116",
|
||||
"50%-88 100%-116 50%-56 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_18" style="portrait" z="60" hidden="false">18
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+56 78 50%+88 110",
|
||||
"50%+56 100%-110 50%+88 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 2);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_18_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_18_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+56 112 50%+88 116",
|
||||
"50%+56 100%-116 50%+88 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_19" style="portrait" z="60" hidden="false">19
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-124 78 50%-92 110",
|
||||
"50%-124 100%-110 50%-92 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 3);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_19_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_19_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-124 112 50%-92 116",
|
||||
"50%-124 100%-116 50%-92 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_20" style="portrait" z="60" hidden="false">20
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+92 78 50%+124 110",
|
||||
"50%+92 100%-110 50%+124 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 4);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_20_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_20_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+92 112 50%+124 116",
|
||||
"50%+92 100%-116 50%+124 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_21" style="portrait" z="60" hidden="false">21
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-160 78 50%-128 110",
|
||||
"50%-160 100%-110 50%-128 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 5);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_21_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_21_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-160 112 50%-128 116",
|
||||
"50%-160 100%-116 50%-128 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_22" style="portrait" z="60" hidden="false">22
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+128 78 50%+160 110",
|
||||
"50%+128 100%-110 50%+160 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 6);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_22_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_22_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+128 112 50%+160 116",
|
||||
"50%+128 100%-116 50%+160 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_23" style="portrait" z="60" hidden="false">23
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-196 78 50%-164 110",
|
||||
"50%-196 100%-110 50%-164 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 7);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_23_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_23_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-196 112 50%-164 116",
|
||||
"50%-196 100%-116 50%-164 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_24" style="portrait" z="60" hidden="false">24
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+164 78 50%+192 110",
|
||||
"50%+164 100%-110 50%+192 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 8);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_24_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_24_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+164 112 50%+192 116",
|
||||
"50%+164 100%-116 50%+192 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_25" style="portrait" z="60" hidden="false">25
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-232 78 50%-200 110",
|
||||
"50%-232 100%-110 50%-200 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 9);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_25_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_25_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-232 112 50%-200 116",
|
||||
"50%-232 100%-116 50%-200 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_26" style="portrait" z="60" hidden="false">26
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+200 78 50%+232 110",
|
||||
"50%+200 100%-110 50%+232 100%-78");
|
||||
AddSizeGroupPane(this.name, 1, 10);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_26_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_26_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+200 112 50%+232 116",
|
||||
"50%+200 100%-116 50%+232 100%-112");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
<!-- Third row. -->
|
||||
<object type="button" name="session_group_pane_portrait_27" style="portrait" z="60" hidden="false">27
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-16 124 50%+16 156",
|
||||
"50%-16 100%-156 50%+16 100%-124");
|
||||
AddSizeGroupPane(this.name, 1, 11);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_27_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_27_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-16 158 50%+16 162",
|
||||
"50%-16 100%-162 50%+16 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_28" style="portrait" z="60" hidden="false">28
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-52 124 50%-20 156",
|
||||
"50%-52 100%-156 50%-20 100%-124");
|
||||
AddSizeGroupPane(this.name, 1, 12);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_28_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_28_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-52 158 50%-20 162",
|
||||
"50%-52 100%-162 50%-20 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_29" style="portrait" z="60" hidden="false">29
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+20 124 50%+52 156",
|
||||
"50%+20 100%-156 50%+52 100%-124");
|
||||
AddSizeGroupPane(this.name, 1, 13);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_29_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_29_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+20 158 50%+52 162",
|
||||
"50%+20 100%-162 50%+52 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_30" style="portrait" z="60" hidden="false">30
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-88 124 50%-56 156",
|
||||
"50%-88 100%-156 50%-56 100%-124");
|
||||
AddSizeGroupPane(this.name, 1, 14);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_30_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_30_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-88 158 50%-56 162",
|
||||
"50%-88 100%-162 50%-56 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
<!-- Third row. -->
|
||||
<object type="button" name="session_group_pane_portrait_31" style="portrait" z="60" hidden="false">31
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+56 124 50%+88 156",
|
||||
"50%+56 100%-156 50%+88 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 0);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_31_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_31_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+56 158 50%+88 162",
|
||||
"50%+56 100%-162 50%+88 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_32" style="portrait" z="60" hidden="false">32
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-124 124 50%-92 156",
|
||||
"50%-124 100%-156 50%-92 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 1);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_32_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_32_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-124 158 50%-92 162",
|
||||
"50%-124 100%-162 50%-92 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_33" style="portrait" z="60" hidden="false">33
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+92 124 50%+124 156",
|
||||
"50%+92 100%-156 50%+124 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 2);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_33_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_33_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+92 158 50%+124 162",
|
||||
"50%+92 100%-162 50%+124 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_34" style="portrait" z="60" hidden="false">34
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-160 124 50%-128 156",
|
||||
"50%-160 100%-156 50%-128 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 3);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_34_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_34_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-160 158 50%-128 162",
|
||||
"50%-160 100%-162 50%-128 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_35" style="portrait" z="60" hidden="false">35
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+128 124 50%+160 156",
|
||||
"50%+128 100%-156 50%+160 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 4);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_35_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_35_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+128 158 50%+160 162",
|
||||
"50%+128 100%-162 50%+160 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_36" style="portrait" z="60" hidden="false">36
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-196 124 50%-164 156",
|
||||
"50%-196 100%-156 50%-164 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 5);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_36_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_36_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-196 158 50%-164 162",
|
||||
"50%-196 100%-162 50%-164 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_37" style="portrait" z="60" hidden="false">37
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+164 124 50%+192 156",
|
||||
"50%+164 100%-156 50%+192 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 6);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_37_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_37_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+164 158 50%+192 162",
|
||||
"50%+164 100%-162 50%+192 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_38" style="portrait" z="60" hidden="false">38
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-232 124 50%-200 156",
|
||||
"50%-232 100%-156 50%-200 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 7);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_38_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_38_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%-232 158 50%-200 162",
|
||||
"50%-232 100%-162 50%-200 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_39" style="portrait" z="60" hidden="false">39
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+200 124 50%+232 156",
|
||||
"50%+200 100%-156 50%+232 100%-124");
|
||||
AddSizeGroupPane(this.name, 2, 8);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_39_bar" style="group_portrait_bar" z="60" hidden="false" >
|
||||
<object type="progressbar" name="session_group_pane_portrait_39_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeString(this.name,
|
||||
"50%+200 158 50%+232 162",
|
||||
"50%+200 100%-162 50%+232 100%-158");
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_40" style="portrait" z="60" hidden="false">40
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPane(this.name, 2, 9);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_40_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_41" style="portrait" z="60" hidden="false">41
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPane(this.name, 2, 10);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_41_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_42" style="portrait" z="60" hidden="false">42
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPane(this.name, 2, 11);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_42_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_43" style="portrait" z="60" hidden="false">43
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPane(this.name, 2, 12);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_43_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_44" style="portrait" z="60" hidden="false">44
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPane(this.name, 2, 13);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_44_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="session_group_pane_portrait_45" style="portrait" z="60" hidden="false">45
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPane(this.name, 2, 14);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="progressbar" name="session_group_pane_portrait_45_bar" style="group_portrait_bar" z="60" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
AddSizeGroupPaneBar(this.name);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- GROUP: TOP BAR -->
|
||||
|
@ -19,7 +19,7 @@
|
||||
<action on="Press"><![CDATA[
|
||||
btCaptions = new Array("Yes, let me out!", "Nooooo!");
|
||||
btCode = new Array("exit();", "GUIObjectHide('mb_main');");
|
||||
messageBox(400, 200, "Do you really want to quit 0 A.D.? This will cause a sudden return into reality.", "Confirmation", 0, btCaptions, btCode);
|
||||
messageBox(400, 200, "Do you really want to quit 0 A.D.? This will cause a sudden return to reality.", "Confirmation", 0, btCaptions, btCode);
|
||||
]]></action>
|
||||
|
||||
<!-- START temporary code
|
||||
|
@ -1,52 +1,11 @@
|
||||
function initSession()
|
||||
{
|
||||
GUIType="bottom";
|
||||
|
||||
// Coord-style size table.
|
||||
SizeCoord = new Array();
|
||||
SizeCoord.last = 0;
|
||||
|
||||
// Standard portrait widths.
|
||||
crd_portrait_lrg_width = 64;
|
||||
crd_portrait_lrg_height = 64;
|
||||
crd_portrait_sml_width = 32;
|
||||
crd_portrait_sml_height = 32;
|
||||
|
||||
initCoord();
|
||||
initGroupPane();
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function AddSizeCoord(objectName, left1, top1, right1, bottom1, rleft1, rtop1, rright1, rbottom1, left2, top2, right2, bottom2, rleft2, rtop2, rright2, rbottom2)
|
||||
{
|
||||
// Used to store the two GUI style sizes for an object on creation (specified as coordinates).
|
||||
// Used later by FlipGUI() to switch the objects to a new set of positions.
|
||||
|
||||
SizeCoord[SizeCoord.last] = new Object();
|
||||
SizeCoord[SizeCoord.last].name = objectName;
|
||||
SizeCoord[SizeCoord.last].size1 = new GUISize(left1, top1, right1, bottom1, rleft1, rtop1, rright1, rbottom1);
|
||||
SizeCoord[SizeCoord.last].size2 = new GUISize(left2, top2, right2, bottom2, rleft2, rtop2, rright2, rbottom2);
|
||||
|
||||
SizeCoord.last++; // Increment counter for next entry.
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function AddSizeString(objectName, size1, size2)
|
||||
{
|
||||
// Used to store the two GUI style sizes for an object on creation (specified as strings).
|
||||
// Used later by FlipGUI() to switch the objects to a new set of positions.
|
||||
|
||||
SizeCoord[SizeCoord.last] = new Object();
|
||||
SizeCoord[SizeCoord.last].name = objectName;
|
||||
SizeCoord[SizeCoord.last].size1 = size1;
|
||||
SizeCoord[SizeCoord.last].size2 = size2;
|
||||
|
||||
SizeCoord.last++; // Increment counter for next entry.
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function setPortrait(objectName, portraitString)
|
||||
{
|
||||
// Use this function as a shortcut to change a portrait object to a different portrait image.
|
||||
@ -62,26 +21,13 @@ function setPortrait(objectName, portraitString)
|
||||
|
||||
// Set the three portraits.
|
||||
GUIObject.sprite = "ui_portrait_" + portraitString + "_64";
|
||||
// Note we need to use a special syntax here (object["param"] instead of object.param) because dashes aren't actually in JS's variable-naming conventions.
|
||||
// Note we need to use a special syntax here (object["param"] instead of object.param because dashes aren't actually in JS's variable-naming conventions.
|
||||
GUIObject["sprite-over"] = GUIObject.sprite + "-lit";
|
||||
GUIObject["sprite-disabled"] = GUIObject.sprite + "-grey";
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function setSize(objectName, sizeString)
|
||||
{
|
||||
// Use this function as a shortcut to change the size of a GUI control, specifying a size string.
|
||||
|
||||
// Get GUI object
|
||||
GUIObject = getGUIObjectByName(objectName);
|
||||
|
||||
// Set size
|
||||
GUIObject.size = sizeString;
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function getObjectInfo()
|
||||
{
|
||||
// Updated each tick to extract entity information from selected unit(s).
|
||||
@ -102,59 +48,7 @@ function getObjectInfo()
|
||||
// strString = "" + selection[0].position;
|
||||
// EntityPos = strString.substring(20,strString.length-3);
|
||||
|
||||
|
||||
// Update name text.
|
||||
// Personal name.
|
||||
if (selection[0].traits.id.personal && selection[0].traits.id.personal != "")
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name1");
|
||||
GUIObject.caption = selection[0].traits.id.personal + "\n";
|
||||
}
|
||||
else{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name1");
|
||||
}
|
||||
// Generic name.
|
||||
if (selection[0].traits.id.generic)
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name2");
|
||||
GUIObject.caption = selection[0].traits.id.generic + "\n";
|
||||
}
|
||||
else{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name2");
|
||||
GUIObject.caption = "";
|
||||
}
|
||||
// Specific/ranked name.
|
||||
if (selection[0].traits.id.ranked)
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name3");
|
||||
GUIObject.caption = selection[0].traits.id.ranked + "\n";
|
||||
}
|
||||
else{
|
||||
if (selection[0].traits.id.specific)
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name3");
|
||||
GUIObject.caption = selection[0].traits.id.specific + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Update portrait
|
||||
if (selection[0].traits.id.icon)
|
||||
{
|
||||
if (selection[0].traits.id.icon_cell)
|
||||
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon + "_" + selection[0].traits.id.icon_cell);
|
||||
else
|
||||
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon);
|
||||
}
|
||||
|
||||
// Update hitpoints
|
||||
if (selection[0].traits.health.curr & selection[0].traits.health.hitpoints)
|
||||
{
|
||||
getGUIObjectByName("session_panel_status_icon_hp_text").caption = Math.round(selection[0].traits.health.curr) + "/" + Math.round(selection[0].traits.health.hitpoints);
|
||||
getGUIObjectByName("session_panel_status_icon_hp_bar").caption = ((Math.round(selection[0].traits.health.curr) * 100 ) / Math.round(selection[0].traits.health.hitpoints));
|
||||
}
|
||||
|
||||
// Reveal Status Orb
|
||||
getGUIObjectByName("session_status_orb").hidden = false;
|
||||
UpdateStatusOrb();
|
||||
|
||||
// Check if a group of entities selected
|
||||
if (selection.length > 1)
|
||||
@ -167,75 +61,7 @@ function getObjectInfo()
|
||||
// getGUIObjectByName("session_group_pane").hidden == true ||
|
||||
selection.length != getGlobal().MultipleEntitiesSelected)
|
||||
{
|
||||
|
||||
// Reveal Group Pane.
|
||||
getGUIObjectByName("session_group_pane").hidden = false;
|
||||
|
||||
// Set size of Group Pane background.
|
||||
if (selection.length <= 13)
|
||||
{
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+86");
|
||||
break;
|
||||
case "bottom":
|
||||
setSize("session_group_pane_bg", "0%+20 100%-86 100%-20 100%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (selection.length > 13 && selection.length < 26)
|
||||
{
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize("session_group_pane_bg", SizeCoord[FlipGUILoop].size1);
|
||||
break;
|
||||
case "bottom":
|
||||
setSize("session_group_pane_bg", SizeCoord[FlipGUILoop].size2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+168");
|
||||
break;
|
||||
case "bottom":
|
||||
setSize("session_group_pane_bg", "0%+20 100%-168 100%-20 100%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Display appropriate portraits.
|
||||
for (groupPaneLoop = 1; groupPaneLoop <= 39; groupPaneLoop++)
|
||||
{
|
||||
groupPanePortrait = getGUIObjectByName("session_group_pane_portrait_" + groupPaneLoop);
|
||||
groupPaneBar = getGUIObjectByName("session_group_pane_portrait_" + groupPaneLoop + "_bar");
|
||||
|
||||
// If it's a valid entity,
|
||||
if (groupPaneLoop <= selection.length){
|
||||
// Reveal and set to display this entity's portrait in the group pane.
|
||||
groupPanePortrait.hidden = false;
|
||||
groupPaneBar.hidden = false;
|
||||
// Set progress bar for hitpoints.
|
||||
if (selection[groupPaneLoop-1].traits.health.curr && selection[groupPaneLoop-1].traits.health.hitpoints)
|
||||
groupPaneBar.caption = ((Math.round(selection[groupPaneLoop-1].traits.health.curr) * 100 ) / Math.round(selection[groupPaneLoop-1].traits.health.hitpoints));
|
||||
if (selection[groupPaneLoop-1].traits.id.icon)
|
||||
setPortrait("session_group_pane_portrait_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon);
|
||||
}
|
||||
// If it's empty, hide its group portrait.
|
||||
else
|
||||
{
|
||||
groupPanePortrait.hidden = true;
|
||||
groupPaneBar.hidden = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UpdateGroupPane();
|
||||
getGlobal().MultipleEntitiesSelected = selection.length;
|
||||
}
|
||||
}
|
||||
@ -252,99 +78,6 @@ function getObjectInfo()
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function FlipGUI(NewGUIType)
|
||||
{
|
||||
// Sets the GUI coordinates and graphics so that the panel is either at the top or bottom of the screen.
|
||||
|
||||
switch (NewGUIType)
|
||||
{
|
||||
// Set which GUI to use.
|
||||
case "top":
|
||||
case "bottom":
|
||||
case "none":
|
||||
GUIType=NewGUIType;
|
||||
break;
|
||||
default:
|
||||
// If no type specified, toggle.
|
||||
if (GUIType == "top")
|
||||
GUIType = "bottom";
|
||||
else
|
||||
if (GUIType == "bottom")
|
||||
GUIType = "none";
|
||||
else
|
||||
GUIType = "top";
|
||||
break;
|
||||
}
|
||||
|
||||
if (GUIType != "none")
|
||||
{
|
||||
GUIObjectUnhide("session_gui");
|
||||
GUIObjectUnhide("always_on");
|
||||
|
||||
// Seek through all sizes created.
|
||||
for (FlipGUILoop = 0; FlipGUILoop < SizeCoord.last; FlipGUILoop++)
|
||||
{
|
||||
// Set each object to the other size.
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size1);
|
||||
switch (SizeCoord[FlipGUILoop].name){
|
||||
case "session_panel_minimap_segbottom1":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_minimap_segbottom2":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_minimap_segbottom3":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_minimap_segbottom4":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_status_bg":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg-top";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "bottom":
|
||||
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size2);
|
||||
switch (SizeCoord[FlipGUILoop].name){
|
||||
case "session_panel_minimap_segbottom1":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop1";
|
||||
break;
|
||||
case "session_panel_minimap_segbottom2":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop2";
|
||||
break;
|
||||
case "session_panel_minimap_segbottom3":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop3";
|
||||
break;
|
||||
case "session_panel_minimap_segbottom4":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop4";
|
||||
break;
|
||||
case "session_panel_status_bg":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg-bottom";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIObjectHide("session_gui");
|
||||
GUIObjectHide("always_on");
|
||||
}
|
||||
|
||||
writeConsole("GUI flipped to " + GUIType + ".");
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function MakeUnit(x, y, z, MakeUnitName)
|
||||
{
|
||||
// Spawn an entity at the given coordinates.
|
||||
|
150
binaries/data/mods/official/gui/test/functions_session_coord.js
Executable file
150
binaries/data/mods/official/gui/test/functions_session_coord.js
Executable file
@ -0,0 +1,150 @@
|
||||
function initCoord()
|
||||
{
|
||||
GUIType="bottom";
|
||||
|
||||
// Coord-style size table.
|
||||
SizeCoord = new Array();
|
||||
SizeCoord.last = 0;
|
||||
|
||||
// Standard portrait widths.
|
||||
crd_portrait_lrg_width = 64;
|
||||
crd_portrait_lrg_height = crd_portrait_lrg_width;
|
||||
crd_portrait_sml_width = 32;
|
||||
crd_portrait_sml_height = crd_portrait_sml_width;
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function AddSizeCoord(objectName, left1, top1, right1, bottom1, rleft1, rtop1, rright1, rbottom1, left2, top2, right2, bottom2, rleft2, rtop2, rright2, rbottom2)
|
||||
{
|
||||
// Used to store the two GUI style sizes for an object on creation (specified as coordinates).
|
||||
// Used later by FlipGUI() to switch the objects to a new set of positions.
|
||||
|
||||
SizeCoord[SizeCoord.last] = new Object();
|
||||
SizeCoord[SizeCoord.last].name = objectName;
|
||||
SizeCoord[SizeCoord.last].size1 = new GUISize(left1, top1, right1, bottom1, rleft1, rtop1, rright1, rbottom1);
|
||||
SizeCoord[SizeCoord.last].size2 = new GUISize(left2, top2, right2, bottom2, rleft2, rtop2, rright2, rbottom2);
|
||||
|
||||
SizeCoord.last++; // Increment counter for next entry.
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function AddSizeString(objectName, size1, size2)
|
||||
{
|
||||
// Used to store the two GUI style sizes for an object on creation (specified as strings).
|
||||
// Used later by FlipGUI() to switch the objects to a new set of positions.
|
||||
|
||||
SizeCoord[SizeCoord.last] = new Object();
|
||||
SizeCoord[SizeCoord.last].name = objectName;
|
||||
SizeCoord[SizeCoord.last].size1 = size1;
|
||||
SizeCoord[SizeCoord.last].size2 = size2;
|
||||
|
||||
SizeCoord.last++; // Increment counter for next entry.
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function setSize(objectName, sizeString)
|
||||
{
|
||||
// Use this function as a shortcut to change the size of a GUI control, specifying a size string.
|
||||
|
||||
// Get GUI object
|
||||
GUIObject = getGUIObjectByName(objectName);
|
||||
|
||||
// Set size
|
||||
GUIObject.size = sizeString;
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function FlipGUI(NewGUIType)
|
||||
{
|
||||
// Sets the GUI coordinates and graphics so that the panel is either at the top or bottom of the screen.
|
||||
|
||||
switch (NewGUIType)
|
||||
{
|
||||
// Set which GUI to use.
|
||||
case "top":
|
||||
case "bottom":
|
||||
case "none":
|
||||
GUIType=NewGUIType;
|
||||
break;
|
||||
default:
|
||||
// If no type specified, toggle.
|
||||
if (GUIType == "top")
|
||||
GUIType = "bottom";
|
||||
else
|
||||
if (GUIType == "bottom")
|
||||
GUIType = "none";
|
||||
else
|
||||
GUIType = "top";
|
||||
break;
|
||||
}
|
||||
|
||||
if (GUIType != "none")
|
||||
{
|
||||
GUIObjectUnhide("session_gui");
|
||||
GUIObjectUnhide("always_on");
|
||||
|
||||
// Seek through all sizes created.
|
||||
for (FlipGUILoop = 0; FlipGUILoop < SizeCoord.last-1; FlipGUILoop++)
|
||||
{
|
||||
// Set each object to the other size.
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size1);
|
||||
switch (SizeCoord[FlipGUILoop].name){
|
||||
case "session_panel_minimap_segbottom1":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_minimap_segbottom2":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_minimap_segbottom3":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_minimap_segbottom4":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
|
||||
break;
|
||||
case "session_panel_status_bg":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg-top";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "bottom":
|
||||
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size2);
|
||||
switch (SizeCoord[FlipGUILoop].name){
|
||||
case "session_panel_minimap_segbottom1":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop1";
|
||||
break;
|
||||
case "session_panel_minimap_segbottom2":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop2";
|
||||
break;
|
||||
case "session_panel_minimap_segbottom3":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop3";
|
||||
break;
|
||||
case "session_panel_minimap_segbottom4":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop4";
|
||||
break;
|
||||
case "session_panel_status_bg":
|
||||
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg-bottom";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIObjectHide("session_gui");
|
||||
GUIObjectHide("always_on");
|
||||
}
|
||||
|
||||
writeConsole("GUI flipped to " + GUIType + ".");
|
||||
}
|
@ -10,6 +10,7 @@ function initGroupPane()
|
||||
crd_grppane_prt_row_bar = new Array();
|
||||
crd_grppane_prt_row.last = 0; // Last size added.
|
||||
crd_grppane_prt_row.style = 2; // Style length.
|
||||
crd_grppane_prt_last = 0; // Total group portraits.
|
||||
|
||||
// Build table of group pane coordinates.
|
||||
initGroupPaneTable();
|
||||
@ -20,8 +21,24 @@ function initGroupPane()
|
||||
function initGroupPaneTable()
|
||||
{
|
||||
AddGroupPaneRow(0, 32, 100, -70); // Row 0
|
||||
AddGroupPaneRow(0, 78, 100, -110); // Row 1
|
||||
AddGroupPaneRow(0, 124, 100, -156); // Row 2
|
||||
// AddGroupPaneRow(0, 170, 100, -202); // Row 3
|
||||
AddGroupPaneCol(50, -16, 50, -16); // Col 0
|
||||
AddGroupPaneCol(50, -52, 50, -52); // Col 1
|
||||
AddGroupPaneCol(50, 20, 50, 20); // Col 2
|
||||
AddGroupPaneCol(50, -88, 50, -88); // Col 3
|
||||
AddGroupPaneCol(50, 56, 50, 56); // Col 4
|
||||
AddGroupPaneCol(50, -124, 50, -124); // Col 5
|
||||
AddGroupPaneCol(50, 92, 50, 92); // Col 6
|
||||
AddGroupPaneCol(50, -160, 50, -160); // Col 7
|
||||
AddGroupPaneCol(50, 128, 50, 128); // Col 8
|
||||
AddGroupPaneCol(50, -196, 50, -196); // Col 9
|
||||
AddGroupPaneCol(50, 164, 50, 164); // Col 10
|
||||
AddGroupPaneCol(50, -232, 50, -232); // Col 11
|
||||
AddGroupPaneCol(50, 200, 50, 200); // Col 12
|
||||
AddGroupPaneCol(50, -268, 50, -268); // Col 13
|
||||
AddGroupPaneCol(50, 236, 50, 236); // Col 14
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
@ -84,6 +101,7 @@ function AddSizeGroupPane(objectName, row, col)
|
||||
SizeCoord[SizeCoord.last].size2 = new GUISize(size_col.left, size_row.top, size_col.right, size_row.bottom, size_col.rleft, size_row.rtop, size_col.rright, size_row.rbottom);
|
||||
|
||||
SizeCoord.last++; // Increment counter for next entry.
|
||||
crd_grppane_prt_last++; // Increment group pane portrait counter.
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
@ -101,3 +119,73 @@ function AddSizeGroupPaneBar(objectName)
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function UpdateGroupPane()
|
||||
{
|
||||
// Reveal Group Pane.
|
||||
getGUIObjectByName("session_group_pane").hidden = false;
|
||||
|
||||
// Set size of Group Pane background.
|
||||
if (selection.length <= 15)
|
||||
{
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+86");
|
||||
break;
|
||||
case "bottom":
|
||||
setSize("session_group_pane_bg", "0%+20 100%-86 100%-20 100%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (selection.length > 15 && selection.length <= 30)
|
||||
{
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+127");
|
||||
break;
|
||||
case "bottom":
|
||||
setSize("session_group_pane_bg", "0%+20 100%-127 100%-20 100%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (GUIType)
|
||||
{
|
||||
case "top":
|
||||
setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+168");
|
||||
break;
|
||||
case "bottom":
|
||||
setSize("session_group_pane_bg", "0%+20 100%-168 100%-20 100%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Display appropriate portraits.
|
||||
for (groupPaneLoop = 1; groupPaneLoop <= crd_grppane_prt_last; groupPaneLoop++)
|
||||
{
|
||||
groupPanePortrait = getGUIObjectByName("session_group_pane_portrait_" + groupPaneLoop);
|
||||
groupPaneBar = getGUIObjectByName("session_group_pane_portrait_" + groupPaneLoop + "_bar");
|
||||
|
||||
// If it's a valid entity,
|
||||
if (groupPaneLoop <= selection.length){
|
||||
// Reveal and set to display this entity's portrait in the group pane.
|
||||
groupPanePortrait.hidden = false;
|
||||
groupPaneBar.hidden = false;
|
||||
// Set progress bar for hitpoints.
|
||||
if (selection[groupPaneLoop-1].traits.health.curr && selection[groupPaneLoop-1].traits.health.hitpoints)
|
||||
groupPaneBar.caption = ((Math.round(selection[groupPaneLoop-1].traits.health.curr) * 100 ) / Math.round(selection[groupPaneLoop-1].traits.health.hitpoints));
|
||||
if (selection[groupPaneLoop-1].traits.id.icon)
|
||||
setPortrait("session_group_pane_portrait_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon);
|
||||
}
|
||||
// If it's empty, hide its group portrait.
|
||||
else
|
||||
{
|
||||
groupPanePortrait.hidden = true;
|
||||
groupPaneBar.hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
55
binaries/data/mods/official/gui/test/functions_session_status_orb.js
Executable file
55
binaries/data/mods/official/gui/test/functions_session_status_orb.js
Executable file
@ -0,0 +1,55 @@
|
||||
function UpdateStatusOrb()
|
||||
{
|
||||
// Update name text.
|
||||
// Personal name.
|
||||
if (selection[0].traits.id.personal && selection[0].traits.id.personal != "")
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name1");
|
||||
GUIObject.caption = selection[0].traits.id.personal + "\n";
|
||||
}
|
||||
else{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name1");
|
||||
}
|
||||
// Generic name.
|
||||
if (selection[0].traits.id.generic)
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name2");
|
||||
GUIObject.caption = selection[0].traits.id.generic + "\n";
|
||||
}
|
||||
else{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name2");
|
||||
GUIObject.caption = "";
|
||||
}
|
||||
// Specific/ranked name.
|
||||
if (selection[0].traits.id.ranked)
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name3");
|
||||
GUIObject.caption = selection[0].traits.id.ranked + "\n";
|
||||
}
|
||||
else{
|
||||
if (selection[0].traits.id.specific)
|
||||
{
|
||||
GUIObject = getGUIObjectByName("session_panel_status_name3");
|
||||
GUIObject.caption = selection[0].traits.id.specific + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Update portrait
|
||||
if (selection[0].traits.id.icon)
|
||||
{
|
||||
if (selection[0].traits.id.icon_cell)
|
||||
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon + "_" + selection[0].traits.id.icon_cell);
|
||||
else
|
||||
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon);
|
||||
}
|
||||
|
||||
// Update hitpoints
|
||||
if (selection[0].traits.health.curr & selection[0].traits.health.hitpoints)
|
||||
{
|
||||
getGUIObjectByName("session_panel_status_icon_hp_text").caption = Math.round(selection[0].traits.health.curr) + "/" + Math.round(selection[0].traits.health.hitpoints);
|
||||
getGUIObjectByName("session_panel_status_icon_hp_bar").caption = ((Math.round(selection[0].traits.health.curr) * 100 ) / Math.round(selection[0].traits.health.hitpoints));
|
||||
}
|
||||
|
||||
// Reveal Status Orb
|
||||
getGUIObjectByName("session_status_orb").hidden = false;
|
||||
}
|
Loading…
Reference in New Issue
Block a user