Various GUI updates and fixes, in particular beginning of an overhaul of the Status Orb.

This was SVN commit r1310.
This commit is contained in:
Acumen 2004-11-13 04:46:05 +00:00
parent 29966d60cd
commit 819fad8520
5 changed files with 157 additions and 51 deletions

View File

@ -807,48 +807,71 @@
]]></action> ]]></action>
<!-- STATUS ORB BACKGROUND --> <!-- STATUS ORB BACKGROUND -->
<object type="text" name="session_panel_status_bg" sprite="session_panel_status_bg-top" z="60" hidden="false"> <object type="button" name="session_panel_status_bg" sprite="session_panel_status_bg-top" textcolor="255 255 255" text-align="left" text-valign="top" ghost="true" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize(this.name, AddSize(this.name,
"0% 0% 0%+184 0%+184", "0% 0% 0%+184 0%+184",
"0% 100%-184 0%+184 100%"); "0% 100%-184 0%+184 100%");
]]></action> ]]></action>
</object> </object>
<!-- SELECTED UNIT LARGE PORTRAIT --> <!-- SELECTED UNIT LARGE PORTRAIT -->
<object type="button" name="session_panel_status_portrait" style="portrait" z="70" hidden="false"> <object type="button" name="session_panel_status_portrait" style="portrait" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize(this.name, AddSize(this.name,
"0%+55 0%+55 119 119", "0%+4 0%+116 0%+68 0%+180",
"0%+55 100%-129 119 100%-65"); "0%+4 100%-180 0%+68 100%-116");
setPortrait(this.name, "unit_dude"); setPortrait(this.name, "unit_dude");
]]></action> ]]></action>
</object> </object>
<!-- STATUS ORB STATISTICS AND ICONS (Experience, Hitpoints, Supply, Garrison) --> <!-- RANK ICON -->
<object type="button" name="session_panel_status_icon_exp" sprite="statistic_rank3" textcolor="255 255 0" text-align="center" text-valign="bottom" z="60" hidden="false"> <object type="button" name="session_panel_status_icon_rank" sprite="statistic_rank2" ghost="true" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_icon_exp", AddSize("session_panel_status_icon_rank",
"0%+75 0%+10 0%+90 0%+47", "0%+50 0%+44 0%+70 0%+47",
"0%+75 100%-172 0%+90 100%-135"); "0%+50 100%-180 0%+70 100%-160");
getGUIObjectByName("session_panel_status_icon_exp").caption = "200/200";
]]></action> ]]></action>
</object> </object>
<object type="progressbar" name="session_panel_status_icon_hp_bar" style="group_portrait_bar" sprite-background="back-bar" z="60" hidden="false"> <!-- HITPOINTS BAR -->
<object type="progressbar" name="session_panel_status_icon_hp_bar" style="group_portrait_bar" sprite-background="back-bar" ghost="true" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_icon_hp_bar", AddSize("session_panel_status_icon_hp_bar",
"0%+55 0%+147 0%+119 0%+160", "0%+6 0%+147 0%+66 0%+160",
"0%+55 100%-33 0%+119 100%-20"); "0%+6 100%-114 0%+66 100%-108");
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_icon_hp_text" textcolor="100 100 100" text-align="center" text-valign="bottom" z="60" hidden="false">
<!-- EXPERIENCE BAR -->
<object type="progressbar" name="session_panel_status_icon_exp_bar" style="up_bar" sprite-background="back-bar" ghost="true" hidden="false">
<action on="Load"><![CDATA[
AddSize("session_panel_status_icon_exp_bar",
"0%+6 0%+147 0%+66 0%+160",
"0%+6 100%-106 0%+66 100%-98");
]]></action>
</object>
<!-- HITPOINTS TEXT -->
<object type="button" name="session_panel_status_icon_hp_text" font="verdana10" textcolor="0 255 0" text-align="center" text-valign="bottom" ghost="true" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_icon_hp_text", AddSize("session_panel_status_icon_hp_text",
"0%+55 0%+148 0%+119 0%+161", "0%+46 0%+148 0%+146 0%+161",
"0%+75 100%-56 0%+90 100%-19"); "0%+46 100%-110 0%+146 100%-104");
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_icon_hp" sprite="statistic_hp" z="60" hidden="false">
<!-- EXPERIENCE TEXT -->
<object type="button" name="session_panel_status_icon_exp_text" font="verdana10" textcolor="255 255 0" text-align="center" text-valign="bottom" ghost="true" hidden="false">
<action on="Load"><![CDATA[
AddSize("session_panel_status_icon_exp_text",
"0%+46 0%+148 0%+146 0%+161",
"0%+46 100%-102 0%+146 100%-94");
getGUIObjectByName("session_panel_status_icon_exp_text").caption = "100/200";
]]></action>
</object>
<object type="button" name="session_panel_status_icon_hp" sprite="statistic_hp" ghost="true" hidden="true">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_icon_hp", AddSize("session_panel_status_icon_hp",
"0%+75 0%+125 0%+95 0%+145", "0%+75 0%+125 0%+95 0%+145",
@ -856,7 +879,32 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_icon_supply" sprite="resource_food" textcolor="252 148 78" text-align="center" text-valign="center" z="60" hidden="false"> <!-- NAME TEXT -->
<object type="text" name="session_panel_status_name1" font="verdana10" textcolor="200 200 200" ghost="true" hidden="false">
<action on="Load"><![CDATA[
AddSize("session_panel_status_name1",
"0%+2 0%+4 0%+254 0%+27",
"0%+2 100%-60 0%+254 100%-37");
]]></action>
</object>
<object type="text" name="session_panel_status_name2" font="verdana12" textcolor="255 255 255" ghost="true" hidden="false">
<action on="Load"><![CDATA[
AddSize("session_panel_status_name2",
"0%+2 0%+19 0%+254 0%+42",
"0%+2 100%-45 0%+254 100%-22");
]]></action>
</object>
<object type="text" name="session_panel_status_name3" font="verdana10" textcolor="200 200 200" ghost="true" hidden="false">
<action on="Load"><![CDATA[
AddSize("session_panel_status_name3",
"0%+2 0%+34 0%+254 0%+59",
"0%+2 100%-28 0%+254 100%-17");
]]></action>
</object>
<!-- STATUS ORB STATISTICS AND ICONS (Experience, Hitpoints, Supply, Garrison) -->
<object type="button" name="session_panel_status_icon_supply" sprite="resource_food" textcolor="252 148 78" text-align="center" text-valign="center" ghost="true" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_icon_supply", AddSize("session_panel_status_icon_supply",
"0%+135 0%+65 0%+150 0%+130", "0%+135 0%+65 0%+150 0%+130",
@ -864,40 +912,40 @@
getGUIObjectByName("session_panel_status_icon_supply").caption = "1575"; getGUIObjectByName("session_panel_status_icon_supply").caption = "1575";
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_icon_garrison" sprite="statistic_garrison" textcolor="100 100 255" text-align="center" text-valign="center" z="60" hidden="false"> <object type="button" name="session_panel_status_icon_garrison" sprite="statistic_garrison" textcolor="100 100 255" text-align="center" text-valign="center" ghost="true" hidden="false">
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_icon_garrison", AddSize("session_panel_status_icon_garrison",
"0%+20 0%+65 0%+35 0%+130", "0%+126 0%+65 0%+141 0%+130",
"0%+20 100%-110 0%+35 100%-45"); "0%+126 100%-160 0%+141 100%-95");
getGUIObjectByName("session_panel_status_icon_garrison").caption = "23/30"; getGUIObjectByName("session_panel_status_icon_garrison").caption = "23/30";
]]></action> ]]></action>
</object> </object>
<!-- PRIMARY COMMAND BUTTONS (arcs the Status Orb) --> <!-- PRIMARY COMMAND BUTTONS (arcs the Status Orb) -->
<object type="button" name="session_panel_status_command_pri_1" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_1" style="portrait" textcolor="255 255 255" z="60" hidden="false">1
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_1", AddSize("session_panel_status_command_pri_1",
"0 160 32 193", "0 184 32 216",
"0 100%-193 32 100%-160"); "0 100%-216 32 100%-184");
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_2" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_2" style="portrait" textcolor="255 255 255" z="60" hidden="false">2
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_2", AddSize("session_panel_status_command_pri_2",
"30 175 62 207", "32 184 64 216",
"30 100%-207 62 100%-175"); "32 100%-216 64 100%-184");
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_3" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_3" style="portrait" textcolor="255 255 255" z="60" hidden="false">3
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_3", AddSize("session_panel_status_command_pri_3",
"63 184 95 216", "65 184 97 216",
"63 100%-216 95 100%-184"); "65 100%-216 97 100%-184");
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_4" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_4" style="portrait" textcolor="255 255 255" z="60" hidden="false">4
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_4", AddSize("session_panel_status_command_pri_4",
"97 180 129 212", "97 180 129 212",
@ -905,7 +953,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_5" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_5" style="portrait" textcolor="255 255 255" z="60" hidden="false">5
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_5", AddSize("session_panel_status_command_pri_5",
"128 168 160 200", "128 168 160 200",
@ -913,7 +961,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_6" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_6" style="portrait" textcolor="255 255 255" z="60" hidden="false">6
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_6", AddSize("session_panel_status_command_pri_6",
"154 148 186 180", "154 148 186 180",
@ -921,7 +969,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_7" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_7" style="portrait" textcolor="255 255 255" z="60" hidden="false">7
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_7", AddSize("session_panel_status_command_pri_7",
"172 121 204 153", "172 121 204 153",
@ -929,7 +977,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_8" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_8" style="portrait" textcolor="255 255 255" z="60" hidden="false">8
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_8", AddSize("session_panel_status_command_pri_8",
"184 90 216 122", "184 90 216 122",
@ -937,7 +985,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_9" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_9" style="portrait" textcolor="255 255 255" z="60" hidden="false">9
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_9", AddSize("session_panel_status_command_pri_9",
"183 57 215 89", "183 57 215 89",
@ -945,7 +993,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_10" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_10" style="portrait" textcolor="255 255 255" z="60" hidden="false">10
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_10", AddSize("session_panel_status_command_pri_10",
"171 26 203 58", "171 26 203 58",
@ -953,7 +1001,7 @@
]]></action> ]]></action>
</object> </object>
<object type="button" name="session_panel_status_command_pri_11" style="portrait" z="60" hidden="false"> <object type="button" name="session_panel_status_command_pri_11" style="portrait" textcolor="255 255 255" z="60" hidden="false">11
<action on="Load"><![CDATA[ <action on="Load"><![CDATA[
AddSize("session_panel_status_command_pri_11", AddSize("session_panel_status_command_pri_11",
"150 0 182 32", "150 0 182 32",

View File

@ -20,29 +20,29 @@
} }
]]></action> ]]></action>
<object type="text" name="manual_bkg" sprite="tooltip-background" size="50%-200 0%+50 50%+200 100%-50" font="prospero16" textcolor="255 255 255" z="100" hidden="false" ghost="true"> <object type="text" name="manual_bkg" sprite="tooltip-background" size="50%-200 0%+50 50%+200 100%-50" font="prospero16" textcolor="255 255 255" hidden="false" ghost="true">
<action on="Tick"><![CDATA[ <action on="Tick"><![CDATA[
if (selection.length && !( getGUIObjectByName( "manual_gui" ).hidden )) if (selection.length && !( getGUIObjectByName( "manual_gui" ).hidden ))
{ {
manualDisplay(); manualDisplay();
} }
]]></action> ]]></action>
</object>
<object type="button" name="manual_portrait" style="portrait" size="50%-192 0%+80 50%-128 0%+144"/> <object type="button" name="manual_portrait" style="portrait" size="50%-192 0%+80 50%-128 0%+144" ghost="true"/>
<object type="text" name="manual_name" sprite="tooltip-background" size="50%-195 0%+149 50%+195 100%-205" font="prospero14" textcolor="255 255 255" ghost="true"/> <object type="text" name="manual_name" sprite="tooltip-background" size="50%-195 0%+149 50%+195 100%-205" font="prospero14" textcolor="255 255 255" ghost="true"/>
<!-- Gee needs to implement text clipping, so long text doesn't get clipped to these scroll windows yet. Scroll bars also don't block world input yet. --> <!-- Gee needs to implement text clipping, so long text doesn't get clipped to these scroll windows yet. Scroll bars also don't block world input yet. -->
<object type="text" name="manual_rollover" scrollbar="true" scrollbar-style="manual_scrollbar" sprite="tooltip-background" size="50%-126 0%+80 50%+195 0%+144" font="prospero16" textcolor="255 255 255" ghost="false"/> <object type="text" name="manual_rollover" scrollbar="true" scrollbar-style="manual_scrollbar" sprite="tooltip-background" size="50%-126 0%+80 50%+195 0%+144" font="prospero16" textcolor="255 255 255" ghost="false"/>
<object type="text" name="manual_history" scrollbar="true" scrollbar-style="manual_scrollbar" sprite="tooltip-background" size="50%-195 100%-200 50%+195 100%-55" font="prospero16" textcolor="255 255 255" ghost="false"/> <object type="text" name="manual_history" scrollbar="true" scrollbar-style="manual_scrollbar" sprite="tooltip-background" size="50%-195 100%-200 50%+195 100%-55" font="prospero16" textcolor="255 255 255" ghost="false"/>
<object type="button" name="manual_exit_button" sprite="exit_sprite" sprite-over="exit_sprite-over" size="50%+184 0%+50 50%+200 0%+66" z="1000" ghost="false" hidden="false"> <object type="button" name="manual_exit_button" sprite="exit_sprite" sprite-over="exit_sprite-over" size="50%+184 0%+50 50%+200 0%+66" z="1000" ghost="false" hidden="false">
<action on="Press"><![CDATA[ <action on="Press"><![CDATA[
// Close manual. // Close manual.
ManualGUI = getGUIObjectByName("manual_gui"); ManualGUI = getGUIObjectByName("manual_gui");
ManualGUI.hidden = true; ManualGUI.hidden = true;
]]></action> ]]></action>
</object>
</object> </object>
</object> </object>

View File

@ -64,6 +64,41 @@ function getObjectInfo()
// strString = "" + selection[0].position; // strString = "" + selection[0].position;
// EntityPos = strString.substring(20,strString.length-3); // 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 // Update portrait
if (selection[0].traits.id.icon) if (selection[0].traits.id.icon)
setPortrait("session_panel_status_portrait", selection[0].traits.id.icon); setPortrait("session_panel_status_portrait", selection[0].traits.id.icon);

View File

@ -108,6 +108,16 @@
<image backcolor="0 200 0" size="0 0 100% 100%" /> <image backcolor="0 200 0" size="0 0 100% 100%" />
</sprite> </sprite>
<sprite name="yellow-bar">
<image backcolor="255 255 255" size="0 1 1 100%-1" />
<image backcolor="255 255 255" size="0 0 100%-1 1" />
<image backcolor="64 64 64" size="100%-1 0 100% 100%" />
<image backcolor="64 64 64" size="0 100%-1 100%-1 100%" />
<image backcolor="128 128 128" size="100%-2 1 100%-1 100%-1" />
<image backcolor="128 128 128" size="1 100%-2 100%-1 100%-1" />
<image backcolor="0 200 200" size="0 0 100% 100%" />
</sprite>
<sprite name="back-bar"> <sprite name="back-bar">
<image backcolor="200 200 200" size="0 1 1 100%-1" /> <image backcolor="200 200 200" size="0 1 1 100%-1" />
<image backcolor="200 200 200" size="0 0 100%-1 1" /> <image backcolor="200 200 200" size="0 0 100%-1 1" />
@ -115,6 +125,13 @@
<image backcolor="200 200 200" size="0 100%-1 100%-1 100%" /> <image backcolor="200 200 200" size="0 100%-1 100%-1 100%" />
</sprite> </sprite>
<sprite name="only-white-border">
<image backcolor="255 255 255" size="-1 -1 100%+1 0" />
<image backcolor="255 255 255" size="-1 100% 100%+1 100%+1" />
<image backcolor="255 255 255" size="-1 0 0 100%" />
<image backcolor="255 255 255" size="100% 0 100%+1 100%" />
</sprite>
<!-- <!--
========================================== ==========================================
PREGAME GUI PREGAME GUI

View File

@ -37,4 +37,10 @@
sprite-bar="green-bar" sprite-bar="green-bar"
tooltip-style="session-tooltip" tooltip-style="session-tooltip"
/> />
<style name="up_bar"
sprite-background=""
sprite-bar="yellow-bar"
tooltip-style="session-tooltip"
/>
</styles> </styles>