diff --git a/binaries/data/config/system.cfg b/binaries/data/config/system.cfg
index 64353c9644..22b234e65a 100755
--- a/binaries/data/config/system.cfg
+++ b/binaries/data/config/system.cfg
@@ -75,7 +75,7 @@ font.misc = verdana16
; GENERAL PREFERENCES:
-sound.mastergain = 1.0
+sound.mastergain = 0.1
; selection.outline.quality = 9; ( higher => very slightly slower, better quality)
; view.scroll.speed = 60
@@ -130,7 +130,7 @@ hotkey.camera.bookmark.save = Ctrl ; +bookmark: Save screen as bookmark.
hotkey.camera.bookmark.snap = Alt ; +bookmark: "check up" on bookmark.
; > CONSOLE SETTINGS
-hotkey.console.toggle = BackQuote, F10 ; Open/close console.
+hotkey.console.toggle = BackQuote, F12 ; Open/close console.
hotkey.console.copy = "Ctrl+C" ; Copy from console to clipboard.
hotkey.console.paste = Insert, "Ctrl+V" ; Paste clipboard to console.
@@ -174,11 +174,11 @@ hotkey.flipgui.toggle = "Alt+G" ; Toggle GUI to top or bottom of screen.
hotkey.alwayson.toggle = "Shift+X" ; Toggle always ons (Exit Button, End Game Button).
; > SUBMENU KEYS
-hotkey.menu.game = "F10" ; Toggle in-game menu.
+hotkey.menu.toggle = "F10" ; Toggle in-game menu.
+hotkey.menu.resign = "Alt+X" ; End current game session and return to main menu.
; > HOTKEYS ONLY
hotkey.onlinehelp = "F1" ; Enable/disable online manual entry for current selection.
-hotkey.endgame = "Alt+X" ; End current game session and return to main menu.
hotkey.next.song = "M" ; Start another music track.
hotkey.audio.toggle = "Ctrl+A" ; Enable/disable sound.
diff --git a/binaries/data/mods/official/gui/test/4_session.xml b/binaries/data/mods/official/gui/test/4_session.xml
index a58699bcc7..ca04dbeee1 100644
--- a/binaries/data/mods/official/gui/test/4_session.xml
+++ b/binaries/data/mods/official/gui/test/4_session.xml
@@ -15,779 +15,186 @@
FlipGUI();
]]>
+
+
+
-
-
- 1
-
-
-
-
-
- 2
-
-
-
-
-
- 3
-
-
-
-
-
- 4
-
-
-
-
-
- 5
-
-
-
-
-
- 6
-
-
-
-
-
- 7
-
-
-
-
-
- 8
-
-
-
-
-
- 9
-
-
-
-
-
- 10
-
-
-
-
-
- 11
-
-
-
-
-
- 12
-
-
-
-
-
- 13
-
-
-
-
-
-
-
- 14
-
-
-
-
-
- 15
-
-
-
-
-
- 16
-
-
-
-
-
- 17
-
-
-
-
-
- 18
-
-
-
-
-
- 19
-
-
-
-
-
- 20
-
-
-
-
-
- 21
-
-
-
-
-
- 22
-
-
-
-
-
- 23
-
-
-
-
-
- 24
-
-
-
-
-
- 25
-
-
-
-
-
-
- 26
-
-
-
-
-
- 27
-
-
-
-
-
- 28
-
-
-
-
-
- 29
-
-
-
-
-
- 30
-
-
-
-
-
- 31
-
-
-
-
-
- 32
-
-
-
-
-
- 33
-
-
-
-
-
- 34
-
-
-
-
-
- 35
-
-
-
-
-
- 36
-
-
-
-
-
- 37
-
-
-
-
-
- 38
-
-
-
-
-
-
- 39
-
-
-
-
-
- 40
-
-
-
-
-
- 41
-
-
-
-
-
- 42
-
-
-
-
-
- 43
-
-
-
-
-
- 44
-
-
-
-
-
- 45
-
-
-
-
-
- 46
-
-
-
-
-
- 47
-
-
-
-
-
- 48
-
-
-
-
-
- 49
-
-
-
-
-
-
- 50
-
-
-
-
-
- 51
-
-
-
-
-
- 51
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
- 1
+ 1
- 2
+ 2
- 3
+ 3
- 4
+ 4
- 5
+ 5
- 6
+ 6
- 7
+ 7
- 8
+ 8
- 9
+ 9
- 10
+ 10
- 11
+ 11
- 12
+ 12
-
+
-
+
- 1
+ 1
- 2
+ 2
- 3
+ 3
- 4
+ 4
- 5
+ 5
- 6
+ 6
- 7
+ 7
- 8
+ 8
- 9
+ 9
- 10
+ 10
- 11
+ 11
- 12
+ 12
-
+
-
+
- 1
+ 1
- 2
+ 2
- 3
+ 3
- 4
+ 4
- 5
+ 5
- 6
+ 6
- 7
+ 7
- 8
+ 8
- 9
+ 9
- 10
+ 10
- 11
+ 11
- 12
+ 12
-
+
-
+
- 1
+ 1
- 2
+ 2
- 3
+ 3
- 4
+ 4
- 5
+ 5
- 6
+ 6
- 7
+ 7
- 8
+ 8
- 9
+ 9
- 10
+ 10
- 11
+ 11
- 12
+ 12
-
+
-
+
- 1
+ 1
- 2
+ 2
- 3
+ 3
- 4
+ 4
- 5
+ 5
- 6
+ 6
- 7
+ 7
- 8
+ 8
- 9
+ 9
- 10
+ 10
- 11
+ 11
- 12
+ 12
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -1485,67 +836,22 @@
GUIObjectToggle("session_team_tray");
]]>
- 1
+
+
+
+
+
+
+
+
+
-
- 2
-
-
- 3
-
-
- 4
-
-
- 5
-
-
- 6
-
-
- 7
-
-
- 8
-
-
- 9
-
@@ -1563,7 +869,7 @@
==========================================
-->
-
+
-
-
-
-
-
-
-
-
-
+
+
- End Game
-
-
-
-
+
-
-
-
-
+
-
diff --git a/binaries/data/mods/official/gui/test/functions_session.js b/binaries/data/mods/official/gui/test/functions_session.js
index e38ff32a02..c0c5b9d520 100755
--- a/binaries/data/mods/official/gui/test/functions_session.js
+++ b/binaries/data/mods/official/gui/test/functions_session.js
@@ -246,52 +246,52 @@ function FlipGUI(NewGUIType)
// Set each object to the other size.
switch (GUIType)
{
- case "top":
+ case "bottom":
setSize(SizeCoord[FlipGUILoop].name, SizeCoord[FlipGUILoop].size1);
switch (SizeCoord[FlipGUILoop].name){
- case "session_panel_minimap_segbottom1":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = SizeCoord[FlipGUILoop].name + "_lit";
+ case "SN_MAP_ORB_SEGBOTTOM1":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop1";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop1" + "_lit";
break;
- case "session_panel_minimap_segbottom2":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = SizeCoord[FlipGUILoop].name + "_lit";
+ case "SN_MAP_ORB_SEGBOTTOM2":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop2";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop2" + "_lit";
break;
- case "session_panel_minimap_segbottom3":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = SizeCoord[FlipGUILoop].name + "_lit";
+ case "SN_MAP_ORB_SEGBOTTOM3":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop3";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop3" + "_lit";
break;
- case "session_panel_minimap_segbottom4":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = SizeCoord[FlipGUILoop].name;
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = SizeCoord[FlipGUILoop].name + "_lit";
+ case "SN_MAP_ORB_SEGBOTTOM4":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop4";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop4" + "_lit";
break;
- case "session_panel_status_bg":
+ case "SN_STATUS_PANE_BG":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg_top";
break;
default:
break;
}
break;
- case "bottom":
+ case "top":
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";
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop1_lit";
+ case "SN_MAP_ORB_SEGBOTTOM1":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom1";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom1_lit";
break;
- case "session_panel_minimap_segbottom2":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop2";
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop2_lit";
+ case "SN_MAP_ORB_SEGBOTTOM2":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom2";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom2_lit";
break;
- case "session_panel_minimap_segbottom3":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop3";
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop3_lit";
+ case "SN_MAP_ORB_SEGBOTTOM3":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom3";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom3_lit";
break;
- case "session_panel_minimap_segbottom4":
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segtop4";
- getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segtop4_lit";
+ case "SN_MAP_ORB_SEGBOTTOM4":
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_minimap_segbottom4";
+ getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite_over = "session_panel_minimap_segbottom4_lit";
break;
- case "session_panel_status_bg":
+ case "SN_STATUS_PANE_BG":
getGUIObjectByName(SizeCoord[FlipGUILoop].name).sprite = "session_panel_status_bg_bottom";
break;
default:
diff --git a/binaries/data/mods/official/gui/test/functions_session_group_pane.js b/binaries/data/mods/official/gui/test/functions_session_group_pane.js
index 301a60992d..3baee5d979 100755
--- a/binaries/data/mods/official/gui/test/functions_session_group_pane.js
+++ b/binaries/data/mods/official/gui/test/functions_session_group_pane.js
@@ -25,6 +25,9 @@ function initGroupPaneTable()
AddGroupPaneRow(0, 70, 100, -102); // Row 1
AddGroupPaneRow(0, 116, 100, -148); // Row 2
AddGroupPaneRow(0, 162, 100, -194); // Row 3
+// AddGroupPaneRow(0, 208, 100, -240); // Row 4
+// AddGroupPaneRow(0, 254, 100, -286); // Row 5
+// AddGroupPaneRow(0, 300, 100, -332); // Row 6
AddGroupPaneCol(50, -16, 50, -16); // Col 0
AddGroupPaneCol(50, -52, 50, -52); // Col 1
AddGroupPaneCol(50, 20, 50, 20); // Col 2
@@ -48,11 +51,11 @@ function AddGroupPaneCol(rleft1, left1, rleft2, left2)
crd_grppane_prt_col[crd_grppane_prt_col.last] = new Array();
- style=0;
+ style=1;
crd_grppane_prt_col[crd_grppane_prt_col.last][style] = new Array();
crd_grppane_prt_col[crd_grppane_prt_col.last][style].size = new GUISize(left1, 0, left1 + crd_portrait_sml_width, 0, rleft1, 0, rleft1, 0);
- style=1;
+ style=0;
crd_grppane_prt_col[crd_grppane_prt_col.last][style] = new Array();
crd_grppane_prt_col[crd_grppane_prt_col.last][style].size = new GUISize(left2, 0, left2 + crd_portrait_sml_width, 0, rleft2, 0, rleft2, 0);
@@ -67,11 +70,11 @@ function AddGroupPaneRow(rtop1, top1, rtop2, top2)
crd_grppane_prt_row[crd_grppane_prt_row.last] = new Array();
- style=0;
+ style=1;
crd_grppane_prt_row[crd_grppane_prt_row.last][style] = new Array();
crd_grppane_prt_row[crd_grppane_prt_row.last][style].size = new GUISize(0, top1, 0, top1 + crd_portrait_sml_height, 0, rtop1, 0, rtop1);
- style=1;
+ style=0;
crd_grppane_prt_row[crd_grppane_prt_row.last][style] = new Array();
crd_grppane_prt_row[crd_grppane_prt_row.last][style].size = new GUISize(0, top2, 0, top2 + crd_portrait_sml_height, 0, rtop2, 0, rtop2);
@@ -179,8 +182,8 @@ function UpdateGroupPane()
// 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");
+ 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){
@@ -191,7 +194,7 @@ function UpdateGroupPane()
if (selection[groupPaneLoop-1].traits.health.curr && selection[groupPaneLoop-1].traits.health.max)
groupPaneBar.caption = ((Math.round(selection[groupPaneLoop-1].traits.health.curr) * 100 ) / Math.round(selection[groupPaneLoop-1].traits.health.max));
// Set portrait.
- setPortrait("session_group_pane_portrait_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon, selection[groupPaneLoop-1].traits.id.civ_code, selection[groupPaneLoop-1].traits.id.icon_cell);
+ setPortrait("SESSION_GROUP_PANE_PORTRAIT_" + groupPaneLoop, selection[groupPaneLoop-1].traits.id.icon, selection[groupPaneLoop-1].traits.id.civ_code, selection[groupPaneLoop-1].traits.id.icon_cell);
}
// If it's empty, hide its group portrait.
else
diff --git a/binaries/data/mods/official/gui/test/functions_session_map_orb.js b/binaries/data/mods/official/gui/test/functions_session_map_orb.js
index a40126622a..4abff769fd 100755
--- a/binaries/data/mods/official/gui/test/functions_session_map_orb.js
+++ b/binaries/data/mods/official/gui/test/functions_session_map_orb.js
@@ -1,68 +1,140 @@
function initMapOrb()
{
- // Mini Map.
- crd_map_orb_minimap_width = 176;
- crd_map_orb_minimap_height = crd_map_orb_minimap_width;
- crd_map_orb_minimap_x = -crd_map_orb_minimap_width;
- crd_map_orb_minimap_y = 0;
+ SN_MINIMAP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 180;
+ Crd[Crd.last-1].height = Crd[Crd.last-1].width;
+ Crd[Crd.last-1].x = 0;
+ Crd[Crd.last-1].y = 0;
- // Map Button Seg Left 1.
- crd_map_orb_segleft1_span_x = 2;
- crd_map_orb_segleft1_span_y = -1;
- crd_map_orb_segleft1_width = 32;
- crd_map_orb_segleft1_height = 46;
- crd_map_orb_segleft1_x = -crd_map_orb_minimap_width-crd_map_orb_segleft1_width+crd_map_orb_segleft1_span_x;
- crd_map_orb_segleft1_y = 0;
+ SN_MAP_ORB_SEGLEFT1 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 32;
+ Crd[Crd.last-1].height = 46;
+ Crd[Crd.last-1].x = Crd[SN_MINIMAP].width;
+ Crd[Crd.last-1].y = Crd[SN_MINIMAP].height-Crd[Crd.last-1].height;
- // Map Button Seg Left 2.
- crd_map_orb_segleft2_span_y = -1;
- crd_map_orb_segleft2_width = 40;
- crd_map_orb_segleft2_height = 44;
- crd_map_orb_segleft2_x = -crd_map_orb_minimap_width-crd_map_orb_segleft2_width+crd_map_orb_segleft1_span_x;
- crd_map_orb_segleft2_y = crd_map_orb_segleft1_y+crd_map_orb_segleft1_height+crd_map_orb_segleft1_span_y;
+ SN_MAP_ORB_SEGLEFT1_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MINIMAP].width;
+ Crd[Crd.last-1].y = 0;
- // Map Button Seg Left 3.
- crd_map_orb_segleft3_span_y = -1;
- crd_map_orb_segleft3_width = crd_map_orb_segleft2_width;
- crd_map_orb_segleft3_height = crd_map_orb_segleft2_height;
- crd_map_orb_segleft3_x = -crd_map_orb_minimap_width-crd_map_orb_segleft3_width+crd_map_orb_segleft1_span_x;
- crd_map_orb_segleft3_y = crd_map_orb_segleft2_y+crd_map_orb_segleft2_height+crd_map_orb_segleft2_span_y;
+ SN_MAP_ORB_SEGLEFT2 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 40;
+ Crd[Crd.last-1].height = 44;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT1].x;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT1].y-Crd[Crd.last-1].height;
- // Map Button Seg Left 4.
- crd_map_orb_segleft4_width = crd_map_orb_segleft1_width;
- crd_map_orb_segleft4_height = crd_map_orb_segleft1_height;
- crd_map_orb_segleft4_x = -crd_map_orb_minimap_width-crd_map_orb_segleft4_width+crd_map_orb_segleft1_span_x;
- crd_map_orb_segleft4_y = crd_map_orb_segleft3_y+crd_map_orb_segleft3_height+crd_map_orb_segleft3_span_y;
+ SN_MAP_ORB_SEGLEFT2_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT1].x;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT2].y-Crd[Crd.last-1].height;
- // Map Button Seg Bottom 1.
- crd_map_orb_segbottom1_span_x = 0;
- crd_map_orb_segbottom1_span_y = -3;
- crd_map_orb_segbottom1_width = 46;
- crd_map_orb_segbottom1_height = 32;
- crd_map_orb_segbottom1_x = -crd_map_orb_minimap_width+crd_map_orb_segbottom1_span_x;
- crd_map_orb_segbottom1_y = crd_map_orb_minimap_y+crd_map_orb_minimap_height+crd_map_orb_segbottom1_span_y;
+ SN_MAP_ORB_SEGLEFT3 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGLEFT2].width;
+ Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGLEFT2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT2].y-Crd[Crd.last-1].height;
- // Map Button Seg Bottom 2.
- crd_map_orb_segbottom2_span_x = -1;
- crd_map_orb_segbottom2_span_y = -3;
- crd_map_orb_segbottom2_width = 44;
- crd_map_orb_segbottom2_height = 40;
- crd_map_orb_segbottom2_x = crd_map_orb_segbottom1_x+crd_map_orb_segbottom1_width+crd_map_orb_segbottom2_span_x;
- crd_map_orb_segbottom2_y = crd_map_orb_minimap_y+crd_map_orb_minimap_height+crd_map_orb_segbottom2_span_y;
+ SN_MAP_ORB_SEGLEFT3_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT1].y-Crd[Crd.last-1].height;
- // Map Button Seg Bottom 3.
- crd_map_orb_segbottom3_span_x = -1;
- crd_map_orb_segbottom3_span_y = -3;
- crd_map_orb_segbottom3_width = crd_map_orb_segbottom2_width;
- crd_map_orb_segbottom3_height = crd_map_orb_segbottom2_height;
- crd_map_orb_segbottom3_x = crd_map_orb_segbottom2_x+crd_map_orb_segbottom2_width+crd_map_orb_segbottom3_span_x;
- crd_map_orb_segbottom3_y = crd_map_orb_minimap_y+crd_map_orb_minimap_height+crd_map_orb_segbottom3_span_y;
+ SN_MAP_ORB_SEGLEFT4 = new Object();
+ SN_MAP_ORB_SEGLEFT4 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGLEFT1].width;
+ Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGLEFT1].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGLEFT3].y-Crd[Crd.last-1].height;
- // Map Button Seg Bottom 4.
- crd_map_orb_segbottom4_span_x = -1;
- crd_map_orb_segbottom4_span_y = -3;
- crd_map_orb_segbottom4_width = crd_map_orb_segbottom1_width;
- crd_map_orb_segbottom4_height = crd_map_orb_segbottom1_height;
- crd_map_orb_segbottom4_x = crd_map_orb_segbottom3_x+crd_map_orb_segbottom3_width+crd_map_orb_segbottom4_span_x;
- crd_map_orb_segbottom4_y = crd_map_orb_minimap_y+crd_map_orb_minimap_height+crd_map_orb_segbottom4_span_y;
+ SN_MAP_ORB_SEGLEFT4_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGLEFT2].x;
+ Crd[Crd.last-1].y = Crd[SN_MINIMAP].height-Crd[Crd.last-1].height;
+
+ SN_MAP_ORB_SEGBOTTOM1 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 46;
+ Crd[Crd.last-1].height = 32;
+ Crd[Crd.last-1].x = Crd[SN_MINIMAP].width-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MINIMAP].height;
+
+ SN_MAP_ORB_SEGBOTTOM1_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MINIMAP].width-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MINIMAP].height;
+
+ SN_MAP_ORB_SEGBOTTOM2 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 44;
+ Crd[Crd.last-1].height = 40;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM1].x-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM1].y;
+
+ SN_MAP_ORB_SEGBOTTOM2_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM1].x-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM1].y;
+
+ SN_MAP_ORB_SEGBOTTOM3 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGBOTTOM2].width;
+ Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGBOTTOM2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM2].x-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
+
+ SN_MAP_ORB_SEGBOTTOM3_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM2].x-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
+
+ SN_MAP_ORB_SEGBOTTOM4 = new Object();
+ SN_MAP_ORB_SEGBOTTOM4 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_MAP_ORB_SEGBOTTOM1].width;
+ Crd[Crd.last-1].height = Crd[SN_MAP_ORB_SEGBOTTOM1].height;
+ Crd[Crd.last-1].x = Crd[SN_MAP_ORB_SEGBOTTOM3].x-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
+
+ SN_MAP_ORB_SEGBOTTOM4_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = 0;
+ Crd[Crd.last-1].y = Crd[SN_MAP_ORB_SEGBOTTOM2].y;
}
diff --git a/binaries/data/mods/official/gui/test/functions_session_resource_pool.js b/binaries/data/mods/official/gui/test/functions_session_resource_pool.js
index bad18ed3ce..5f11d94ac7 100755
--- a/binaries/data/mods/official/gui/test/functions_session_resource_pool.js
+++ b/binaries/data/mods/official/gui/test/functions_session_resource_pool.js
@@ -1,26 +1,46 @@
function initResourcePool()
{
- // Resource counter (base).
- crd_resource_counter_width_base = 53;
- crd_resource_counter_height_base = 19;
- // Resource counter (short).
- crd_resource_counter_width = crd_mini_icon_width+crd_resource_counter_width_base+1;
- crd_resource_counter_height = crd_mini_icon_height;
- // Resource counter (long).
- crd_resource_counter_long_width = crd_resource_counter_width+9;
- crd_resource_counter_long_height = crd_resource_counter_height;
- // Resource counter span.
- crd_resource_counter_span = 5;
- crd_resource_food_x = -200;
- crd_resource_food_y = 4;
- crd_resource_wood_x = crd_resource_food_x+crd_resource_counter_width+crd_resource_counter_span;
- crd_resource_wood_y = crd_resource_food_y;
- crd_resource_stone_x = crd_resource_wood_x+crd_resource_counter_width+crd_resource_counter_span;
- crd_resource_stone_y = crd_resource_wood_y;
- crd_resource_ore_x = crd_resource_stone_x+crd_resource_counter_width+crd_resource_counter_span;
- crd_resource_ore_y = crd_resource_stone_y;
- crd_resource_population_x = crd_resource_ore_x+crd_resource_counter_width+crd_resource_counter_span;
- crd_resource_population_y = crd_resource_ore_y;
+ SN_RESOURCE_COUNTER_SPAN = 5;
+
+ SN_RESOURCE_COUNTER_FOOD = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = crd_mini_icon_width+54;
+ Crd[Crd.last-1].height = crd_mini_icon_height;
+ Crd[Crd.last-1].x = -200;
+ Crd[Crd.last-1].y = 4;
+
+ SN_RESOURCE_COUNTER_WOOD = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width;
+ Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
+ Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_FOOD].x+Crd[SN_RESOURCE_COUNTER_FOOD].width+SN_RESOURCE_COUNTER_SPAN;
+ Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
+
+ SN_RESOURCE_COUNTER_STONE = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width;
+ Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
+ Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_WOOD].x+Crd[SN_RESOURCE_COUNTER_WOOD].width+SN_RESOURCE_COUNTER_SPAN;
+ Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
+
+ SN_RESOURCE_COUNTER_ORE = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width;
+ Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
+ Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_STONE].x+Crd[SN_RESOURCE_COUNTER_STONE].width+SN_RESOURCE_COUNTER_SPAN;
+ Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
+
+ SN_RESOURCE_COUNTER_POPULATION = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[SN_RESOURCE_COUNTER_FOOD].width+9;
+ Crd[Crd.last-1].height = Crd[SN_RESOURCE_COUNTER_FOOD].height;
+ Crd[Crd.last-1].x = Crd[SN_RESOURCE_COUNTER_ORE].x+Crd[SN_RESOURCE_COUNTER_ORE].width+SN_RESOURCE_COUNTER_SPAN;
+ Crd[Crd.last-1].y = Crd[SN_RESOURCE_COUNTER_FOOD].y;
}
// ====================================================================
@@ -54,9 +74,9 @@ function GiveResources(resourceName, resourceQty)
function UpdateResourcePool()
{
- getGUIObjectByName("resource_food_counter").caption = player.resource.food;
- getGUIObjectByName("resource_wood_counter").caption = player.resource.wood;
- getGUIObjectByName("resource_stone_counter").caption = player.resource.stone;
- getGUIObjectByName("resource_ore_counter").caption = player.resource.ore;
- getGUIObjectByName("resource_population_counter").caption = player.resource.pop.curr + "/" + player.resource.pop.housing;
+ getGUIObjectByName("SN_RESOURCE_COUNTER_FOOD").caption = player.resource.food;
+ getGUIObjectByName("SN_RESOURCE_COUNTER_WOOD").caption = player.resource.wood;
+ getGUIObjectByName("SN_RESOURCE_COUNTER_STONE").caption = player.resource.stone;
+ getGUIObjectByName("SN_RESOURCE_COUNTER_ORE").caption = player.resource.ore;
+ getGUIObjectByName("SN_RESOURCE_COUNTER_POPULATION").caption = player.resource.pop.curr + "/" + player.resource.pop.housing;
}
\ No newline at end of file
diff --git a/binaries/data/mods/official/gui/test/functions_session_status_orb.js b/binaries/data/mods/official/gui/test/functions_session_status_orb.js
index 397f336e06..ed8701f435 100755
--- a/binaries/data/mods/official/gui/test/functions_session_status_orb.js
+++ b/binaries/data/mods/official/gui/test/functions_session_status_orb.js
@@ -1,5 +1,216 @@
function initStatusOrb()
{
+ SN_STATUS_PANE_BG = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 255;
+ Crd[Crd.last-1].height = 170;
+ Crd[Crd.last-1].x = 0;
+ Crd[Crd.last-1].y = 0;
+
+ SN_STATUS_PANE_HEADING = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_BG].width;
+ Crd[Crd.last-1].height = 14;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_BG].x+2;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y+Crd[SN_STATUS_PANE_BG].height-Crd[Crd.last-1].height-3;
+
+ SN_STATUS_PANE_HEADING_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_BG].y+3;
+
+ SN_STATUS_PANE_PORTRAIT = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = crd_portrait_lrg_width;
+ Crd[Crd.last-1].height = crd_portrait_lrg_height;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_HEADING].x+5;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_HEADING].y-Crd[Crd.last-1].height-7;
+
+ SN_STATUS_PANE_PORTRAIT_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_HEADING_FLP].y+Crd[SN_STATUS_PANE_HEADING_FLP].height+7;
+
+ SN_STATUS_PANE_ICON_RANK = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = crd_mini_icon_width;
+ Crd[Crd.last-1].height = crd_mini_icon_height;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x+Crd[SN_STATUS_PANE_PORTRAIT].width-Crd[Crd.last-1].width;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT].y;
+
+ SN_STATUS_PANE_ICON_RANK_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT_FLP].y;
+
+ SN_STATUS_PANE_NAME1 = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_BG].width-Crd[SN_STATUS_PANE_PORTRAIT].width-10;
+ Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_PORTRAIT].height;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x+Crd[SN_STATUS_PANE_PORTRAIT].width+2;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT].y;
+
+ SN_STATUS_PANE_NAME1_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT_FLP].y;
+
+ SN_STATUS_PANE_ICON_HP_BAR_SPAN = 2;
+ SN_STATUS_PANE_ICON_HP_TEXT_X_SPAN = 4;
+ SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN = 0;
+
+ SN_STATUS_PANE_ICON_HP_BAR = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_PORTRAIT].width;
+ Crd[Crd.last-1].height = 6;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT].y-Crd[Crd.last-1].height-SN_STATUS_PANE_ICON_HP_BAR_SPAN;
+
+ SN_STATUS_PANE_ICON_HP_BAR_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_PORTRAIT_FLP].y+Crd[SN_STATUS_PANE_PORTRAIT_FLP].height+SN_STATUS_PANE_ICON_HP_BAR_SPAN;
+
+ SN_STATUS_PANE_ICON_HP_TEXT = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 55;
+ Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_ICON_HP_BAR].height;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_NAME1].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
+
+ SN_STATUS_PANE_ICON_HP_TEXT_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
+
+ SN_STATUS_PANE_ICON_XP_BAR = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_ICON_HP_BAR].width;
+ Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_ICON_HP_BAR].height;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_ICON_HP_BAR].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR].y-Crd[SN_STATUS_PANE_ICON_HP_BAR].height-SN_STATUS_PANE_ICON_HP_BAR_SPAN-1;
+
+ SN_STATUS_PANE_ICON_XP_BAR_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].y+Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].height+SN_STATUS_PANE_ICON_HP_BAR_SPAN+1;
+
+ SN_STATUS_PANE_ICON_XP_TEXT = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = Crd[SN_STATUS_PANE_ICON_HP_TEXT].width;
+ Crd[Crd.last-1].height = Crd[SN_STATUS_PANE_ICON_HP_TEXT].height;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_ICON_HP_TEXT].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
+
+ SN_STATUS_PANE_ICON_XP_TEXT_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].y+SN_STATUS_PANE_ICON_HP_TEXT_Y_SPAN;
+
+ SN_STATUS_PANE_2STAT = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = 126;
+ Crd[Crd.last-1].height = 30;
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_ICON_HP_TEXT].x+Crd[SN_STATUS_PANE_ICON_HP_TEXT].width;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR].y+crd_mini_icon_width+1;
+
+ SN_STATUS_PANE_2STAT_FLP = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+ Crd[Crd.last-1].x = Crd[Crd.last-2].x;
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_HP_BAR_FLP].y+crd_mini_icon_width+1;
+
+ SN_STATUS_PANE_STAT = new Array();
+ SN_STATUS_PANE_STAT_FLP = new Array();
+ SN_STATUS_PANE_STAT.last = 0;
+ SN_STATUS_PANE_STAT.row_curr = 1;
+ SN_STATUS_PANE_STAT.col_curr = 1;
+ SN_STATUS_PANE_STAT.row = 2;
+ SN_STATUS_PANE_STAT.col = 6;
+ SN_STATUS_PANE_STAT.max = 12;
+ for (SN_STATUS_PANE_STAT.curr = 1; SN_STATUS_PANE_STAT.curr <= SN_STATUS_PANE_STAT.max; SN_STATUS_PANE_STAT.curr++)
+ {
+ SN_STATUS_PANE_STAT[SN_STATUS_PANE_STAT.curr] = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = left_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = left_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = (Crd[SN_STATUS_PANE_BG].width-14)/6;
+ Crd[Crd.last-1].height = 30;
+
+ if (SN_STATUS_PANE_STAT.col_curr == 1)
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT].x;
+ else
+ Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width;
+
+ if (SN_STATUS_PANE_STAT.row_curr == 1)
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR].y-Crd[Crd.last-1].height;
+ else
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR].y-Crd[Crd.last-1].height-Crd[Crd.last-3].height;
+
+ SN_STATUS_PANE_STAT_FLP[SN_STATUS_PANE_STAT.curr] = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = Crd[Crd.last-2].rleft; Crd[Crd.last-1].rtop = top_screen;
+ Crd[Crd.last-1].rright = Crd[Crd.last-2].rright; Crd[Crd.last-1].rbottom = top_screen;
+ Crd[Crd.last-1].width = Crd[Crd.last-2].width;
+ Crd[Crd.last-1].height = Crd[Crd.last-2].height;
+
+ if (SN_STATUS_PANE_STAT.col_curr == 1)
+ Crd[Crd.last-1].x = Crd[SN_STATUS_PANE_PORTRAIT_FLP].x;
+ else
+ Crd[Crd.last-1].x = Crd[Crd.last-3].x+Crd[Crd.last-3].width;
+
+ if (SN_STATUS_PANE_STAT.row_curr == 1)
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].y+Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].height;
+ else
+ Crd[Crd.last-1].y = Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].y+Crd[SN_STATUS_PANE_ICON_XP_BAR_FLP].height+Crd[Crd.last-3].height;
+
+ if (SN_STATUS_PANE_STAT.col_curr == SN_STATUS_PANE_STAT.col)
+ {
+ SN_STATUS_PANE_STAT.row_curr++;
+ SN_STATUS_PANE_STAT.col_curr = 0;
+ }
+ SN_STATUS_PANE_STAT.col_curr++;
+ }
+ SN_STATUS_PANE_STAT.last = SN_STATUS_PANE_STAT.curr;
+
+
+
+
+/*
// Status Orb background.
crd_status_orb_bkg_x = 0;
crd_status_orb_bkg_y = 0;
@@ -126,6 +337,12 @@ function initStatusOrb()
crd_status_orb_stat6_2_height = crd_status_orb_stat1_2_height;
crd_status_orb_stat6_2_x = crd_status_orb_stat5_2_x+crd_status_orb_stat5_2_width;
crd_status_orb_stat6_2_y = crd_status_orb_stat1_2_y;
+*/
+ // Status Orb background.
+ crd_status_orb_bkg_x = 0;
+ crd_status_orb_bkg_y = 0;
+ crd_status_orb_bkg_width = 255;
+ crd_status_orb_bkg_height = 170;
// Command Button 1.
command_sub_max = 12; // Maximum number of entries in a command button list.
@@ -699,13 +916,13 @@ function UpdateCommandButtons()
function UpdateStatusOrb()
{
// Update heading.
- GUIObject = getGUIObjectByName("session_panel_status_heading");
+ GUIObject = getGUIObjectByName("SN_STATUS_PANE_HEADING");
GUIObject.caption = selection[0].player.name; // Player name (placeholder; replace with proper callsign).
if (selection[0].traits.id.civ)
GUIObject.caption += " [icon=bullet_icon] " + selection[0].traits.id.civ;
// Update name text.
- GUIObject = getGUIObjectByName("session_panel_status_name1");
+ GUIObject = getGUIObjectByName("SN_STATUS_PANE_NAME1");
GUIObject.caption = "";
// Personal name.
if (selection[0].traits.id.personal && selection[0].traits.id.personal != "")
@@ -720,7 +937,7 @@ function UpdateStatusOrb()
// Specific/ranked name.
if (selection[0].traits.id.ranked)
{
- GUIObject = getGUIObjectByName("session_panel_status_name1");
+ GUIObject = getGUIObjectByName("SN_STATUS_PANE_NAME1");
GUIObject.caption += selection[0].traits.id.ranked + "\n";
}
else{
@@ -732,10 +949,10 @@ function UpdateStatusOrb()
// Update portrait
if (selection[0].traits.id.icon)
- setPortrait("session_panel_status_portrait", selection[0].traits.id.icon, selection[0].traits.id.civ_code, selection[0].traits.id.icon_cell);
+ setPortrait("SN_STATUS_PANE_PORTRAIT", selection[0].traits.id.icon, selection[0].traits.id.civ_code, selection[0].traits.id.icon_cell);
// Update rank.
- GUIObject = getGUIObjectByName("session_panel_status_icon_rank");
+ GUIObject = getGUIObjectByName("SN_STATUS_PANE_ICON_RANK");
if (selection[0].traits.up.rank > 1)
{
GUIObject.sprite = "ui_icon_sheet_statistic";
@@ -747,33 +964,33 @@ function UpdateStatusOrb()
// Update hitpoints
if (selection[0].traits.health.curr && selection[0].traits.health.max)
{
- getGUIObjectByName("session_panel_status_icon_hp_text").caption = Math.round(selection[0].traits.health.curr) + "/" + Math.round(selection[0].traits.health.max);
- getGUIObjectByName("session_panel_status_icon_hp_text").hidden = false;
- getGUIObjectByName("session_panel_status_icon_hp_bar").caption = ((Math.round(selection[0].traits.health.curr) * 100 ) / Math.round(selection[0].traits.health.max));
- getGUIObjectByName("session_panel_status_icon_hp_bar").hidden = false;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_HP_TEXT").caption = Math.round(selection[0].traits.health.curr) + "/" + Math.round(selection[0].traits.health.max);
+ getGUIObjectByName("SN_STATUS_PANE_ICON_HP_TEXT").hidden = false;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_HP_BAR").caption = ((Math.round(selection[0].traits.health.curr) * 100 ) / Math.round(selection[0].traits.health.max));
+ getGUIObjectByName("SN_STATUS_PANE_ICON_HP_BAR").hidden = false;
}
else
{
- getGUIObjectByName("session_panel_status_icon_hp_text").hidden = true;
- getGUIObjectByName("session_panel_status_icon_hp_bar").hidden = true;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_HP_TEXT").hidden = true;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_HP_BAR").hidden = true;
}
// Update upgrade points
if (selection[0].traits.up && selection[0].traits.up.curr && selection[0].traits.up.req)
{
- getGUIObjectByName("session_panel_status_icon_xp_text").caption = Math.round(selection[0].traits.up.curr) + "/" + Math.round(selection[0].traits.up.req);
- getGUIObjectByName("session_panel_status_icon_xp_text").hidden = false;
- getGUIObjectByName("session_panel_status_icon_xp_bar").caption = ((Math.round(selection[0].traits.up.curr) * 100 ) / Math.round(selection[0].traits.up.req));
- getGUIObjectByName("session_panel_status_icon_xp_bar").hidden = false;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_XP_TEXT").caption = Math.round(selection[0].traits.up.curr) + "/" + Math.round(selection[0].traits.up.req);
+ getGUIObjectByName("SN_STATUS_PANE_ICON_XP_TEXT").hidden = false;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_XP_BAR").caption = ((Math.round(selection[0].traits.up.curr) * 100 ) / Math.round(selection[0].traits.up.req));
+ getGUIObjectByName("SN_STATUS_PANE_ICON_XP_BAR").hidden = false;
}
else
{
- getGUIObjectByName("session_panel_status_icon_xp_text").hidden = true;
- getGUIObjectByName("session_panel_status_icon_xp_bar").hidden = true;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_XP_TEXT").hidden = true;
+ getGUIObjectByName("SN_STATUS_PANE_ICON_XP_BAR").hidden = true;
}
// Update Supply/Garrison
- GUIObject = getGUIObjectByName("session_panel_status_stat1");
+ GUIObject = getGUIObjectByName("SN_STATUS_PANE_2STAT");
GUIObject.caption = '';
if (selection[0].traits.garrison)
@@ -798,55 +1015,55 @@ function UpdateStatusOrb()
// Update Attack stats
if (selection[0].actions.attack && selection[0].actions.attack.damage && selection[0].actions.attack.damage > 0)
- getGUIObjectByName("session_panel_status_stat1_1").caption = '[icon="icon_statistic_attack"]' + selection[0].actions.attack.damage;
+ getGUIObjectByName("SN_STATUS_PANE_STAT1").caption = '[icon="icon_statistic_attack"]' + selection[0].actions.attack.damage;
else
- getGUIObjectByName("session_panel_status_stat1_1").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT1").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.hack && selection[0].actions.attack.hack > 0)
- getGUIObjectByName("session_panel_status_stat2_1").caption = '[icon="icon_statistic_hack"]' + Math.round(selection[0].actions.attack.hack*100) + '%';
+ getGUIObjectByName("SN_STATUS_PANE_STAT2").caption = '[icon="icon_statistic_hack"]' + Math.round(selection[0].actions.attack.hack*100) + '%';
else
- getGUIObjectByName("session_panel_status_stat2_1").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT2").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.pierce && selection[0].actions.attack.pierce > 0)
- getGUIObjectByName("session_panel_status_stat3_1").caption = '[icon="icon_statistic_pierce"]' + Math.round(selection[0].actions.attack.pierce*100) + '%';
+ getGUIObjectByName("SN_STATUS_PANE_STAT3").caption = '[icon="icon_statistic_pierce"]' + Math.round(selection[0].actions.attack.pierce*100) + '%';
else
- getGUIObjectByName("session_panel_status_stat3_1").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT3").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.crush && selection[0].actions.attack.crush > 0)
- getGUIObjectByName("session_panel_status_stat4_1").caption = '[icon="icon_statistic_crush"]' + Math.round(selection[0].actions.attack.crush*100) + '%';
+ getGUIObjectByName("SN_STATUS_PANE_STAT4").caption = '[icon="icon_statistic_crush"]' + Math.round(selection[0].actions.attack.crush*100) + '%';
else
- getGUIObjectByName("session_panel_status_stat4_1").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT4").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.range && selection[0].actions.attack.range > 0)
- getGUIObjectByName("session_panel_status_stat5_1").caption = '[icon="icon_statistic_range"]' + selection[0].actions.attack.range;
+ getGUIObjectByName("SN_STATUS_PANE_STAT5").caption = '[icon="icon_statistic_range"]' + selection[0].actions.attack.range;
else
- getGUIObjectByName("session_panel_status_stat5_1").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT5").caption = "";
if (selection[0].actions.attack && selection[0].actions.attack.accuracy && selection[0].actions.attack.accuracy > 0)
- getGUIObjectByName("session_panel_status_stat6_1").caption = '[icon="icon_statistic_accuracy"]' + Math.round(selection[0].actions.attack.accuracy*100) + '%';
+ getGUIObjectByName("SN_STATUS_PANE_STAT6").caption = '[icon="icon_statistic_accuracy"]' + Math.round(selection[0].actions.attack.accuracy*100) + '%';
else
- getGUIObjectByName("session_panel_status_stat6_1").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT6").caption = "";
// Update Armour & Other stats
if (selection[0].traits.armour && selection[0].traits.armour.value && selection[0].traits.armour.value > 0)
- getGUIObjectByName("session_panel_status_stat1_2").caption = '[icon="icon_statistic_armour"]' + selection[0].traits.armour.value;
- else getGUIObjectByName("session_panel_status_stat1_2").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT7").caption = '[icon="icon_statistic_armour"]' + selection[0].traits.armour.value;
+ else getGUIObjectByName("SN_STATUS_PANE_STAT7").caption = "";
if (selection[0].traits.armour && selection[0].traits.armour.hack && selection[0].traits.armour.hack > 0)
- getGUIObjectByName("session_panel_status_stat2_2").caption = '[icon="icon_statistic_hack"]' + Math.round(selection[0].traits.armour.hack*100) + '%';
- else getGUIObjectByName("session_panel_status_stat2_2").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT8").caption = '[icon="icon_statistic_hack"]' + Math.round(selection[0].traits.armour.hack*100) + '%';
+ else getGUIObjectByName("SN_STATUS_PANE_STAT8").caption = "";
if (selection[0].traits.armour && selection[0].traits.armour.pierce && selection[0].traits.armour.pierce > 0)
- getGUIObjectByName("session_panel_status_stat3_2").caption = '[icon="icon_statistic_pierce"]' + Math.round(selection[0].traits.armour.pierce*100) + '%';
- else getGUIObjectByName("session_panel_status_stat3_2").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT9").caption = '[icon="icon_statistic_pierce"]' + Math.round(selection[0].traits.armour.pierce*100) + '%';
+ else getGUIObjectByName("SN_STATUS_PANE_STAT9").caption = "";
if (selection[0].traits.armour && selection[0].traits.armour.crush && selection[0].traits.armour.crush > 0)
- getGUIObjectByName("session_panel_status_stat4_2").caption = '[icon="icon_statistic_crush"]' + Math.round(selection[0].traits.armour.crush*100) + '%';
- else getGUIObjectByName("session_panel_status_stat4_2").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT10").caption = '[icon="icon_statistic_crush"]' + Math.round(selection[0].traits.armour.crush*100) + '%';
+ else getGUIObjectByName("SN_STATUS_PANE_STAT10").caption = "";
if (selection[0].actions.move && selection[0].actions.move.speed)
- getGUIObjectByName("session_panel_status_stat5_2").caption = '[icon="icon_statistic_speed"]' + selection[0].actions.move.speed;
- else getGUIObjectByName("session_panel_status_stat5_2").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT11").caption = '[icon="icon_statistic_speed"]' + selection[0].actions.move.speed;
+ else getGUIObjectByName("SN_STATUS_PANE_STAT11").caption = "";
if (selection[0].traits.vision && selection[0].traits.vision.los)
- getGUIObjectByName("session_panel_status_stat6_2").caption = '[icon="icon_statistic_los"]' + selection[0].traits.vision.los;
- else getGUIObjectByName("session_panel_status_stat6_2").caption = "";
+ getGUIObjectByName("SN_STATUS_PANE_STAT12").caption = '[icon="icon_statistic_los"]' + selection[0].traits.vision.los;
+ else getGUIObjectByName("SN_STATUS_PANE_STAT12").caption = "";
// Reveal Status Orb
getGUIObjectByName("session_status_orb").hidden = false;
diff --git a/binaries/data/mods/official/gui/test/functions_session_subwindows.js b/binaries/data/mods/official/gui/test/functions_session_subwindows.js
index d9c28509bb..d0cb060be9 100644
--- a/binaries/data/mods/official/gui/test/functions_session_subwindows.js
+++ b/binaries/data/mods/official/gui/test/functions_session_subwindows.js
@@ -1,29 +1,39 @@
function initSubWindows()
{
- // In-Game Menu background.
- crd_ingame_menu_bkg_x = -100;
- crd_ingame_menu_bkg_y = -150;
- crd_ingame_menu_bkg_width = (crd_ingame_menu_bkg_x * -1) * 2;
- crd_ingame_menu_bkg_height = (crd_ingame_menu_bkg_y * -1) * 2;
+ SN_INGAME_MENU_BG = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
+ Crd[Crd.last-1].x = -100;
+ Crd[Crd.last-1].y = -150;
+ Crd[Crd.last-1].width = (Crd[Crd.last-1].x * -1) * 2;
+ Crd[Crd.last-1].height = (Crd[Crd.last-1].y * -1) * 2;
- // Return button.
- crd_ingame_menu_return_button_width = crd_ingame_menu_bkg_width;
- crd_ingame_menu_return_button_height = 34;
- crd_ingame_menu_return_button_x = crd_ingame_menu_bkg_x;
- crd_ingame_menu_return_button_y = crd_ingame_menu_bkg_y+crd_ingame_menu_bkg_height-crd_ingame_menu_return_button_height;
- crd_ingame_menu_button_span = 5;
+ SN_INGAME_MENU_BTN = new Object();
+ SN_INGAME_MENU_BTN.span = 5;
- // Exit button.
- crd_ingame_menu_exit_button_width = crd_ingame_menu_return_button_width;
- crd_ingame_menu_exit_button_height = crd_ingame_menu_return_button_height;
- crd_ingame_menu_exit_button_x = crd_ingame_menu_return_button_x;
- crd_ingame_menu_exit_button_y = crd_ingame_menu_return_button_y-crd_ingame_menu_return_button_height-crd_ingame_menu_button_span;
+ SN_INGAME_MENU_BTN_RETURN = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
+ Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BG].width;
+ Crd[Crd.last-1].height = 34;
+ Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BG].x;
+ Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BG].y+Crd[SN_INGAME_MENU_BG].height-Crd[Crd.last-1].height;
- // End Game / Resign button.
- crd_ingame_menu_end_button_width = crd_ingame_menu_exit_button_width;
- crd_ingame_menu_end_button_height = crd_ingame_menu_exit_button_height;
- crd_ingame_menu_end_button_x = crd_ingame_menu_exit_button_x;
- crd_ingame_menu_end_button_y = crd_ingame_menu_exit_button_y-crd_ingame_menu_exit_button_height-crd_ingame_menu_button_span;
+ SN_INGAME_MENU_BTN_EXIT = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
+ Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BTN_RETURN].width;
+ Crd[Crd.last-1].height = Crd[SN_INGAME_MENU_BTN_RETURN].height;
+ Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BTN_RETURN].x;
+ Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BTN_RETURN].y-Crd[SN_INGAME_MENU_BTN_RETURN].height-SN_INGAME_MENU_BTN.span;
+
+ SN_INGAME_MENU_BTN_RESIGN = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = mid_screen; Crd[Crd.last-1].rtop = mid_screen;
+ Crd[Crd.last-1].rright = mid_screen; Crd[Crd.last-1].rbottom = mid_screen;
+ Crd[Crd.last-1].width = Crd[SN_INGAME_MENU_BTN_RETURN].width;
+ Crd[Crd.last-1].height = Crd[SN_INGAME_MENU_BTN_RETURN].height;
+ Crd[Crd.last-1].x = Crd[SN_INGAME_MENU_BTN_RETURN].x;
+ Crd[Crd.last-1].y = Crd[SN_INGAME_MENU_BTN_EXIT].y-Crd[SN_INGAME_MENU_BTN_EXIT].height-SN_INGAME_MENU_BTN.span;
}
// ====================================================================
\ No newline at end of file
diff --git a/binaries/data/mods/official/gui/test/functions_session_team_tray.js b/binaries/data/mods/official/gui/test/functions_session_team_tray.js
index 52c2072ef5..8f730e78ad 100755
--- a/binaries/data/mods/official/gui/test/functions_session_team_tray.js
+++ b/binaries/data/mods/official/gui/test/functions_session_team_tray.js
@@ -1,58 +1,23 @@
function initTeamTray()
{
- // Team Tray Button 1.
- crd_team_tray_1_width = crd_portrait_sml_width;
- crd_team_tray_1_height = crd_portrait_sml_height;
- crd_team_tray_1_x = -(crd_team_tray_1_width/1.5);
- crd_team_tray_1_y = crd_map_orb_minimap_height+(crd_team_tray_1_height/2);
+ SN_TEAM_TRAY = new Array();
+ SN_TEAM_TRAY.last = 0;
+ SN_TEAM_TRAY.max = 9;
+ for (SN_TEAM_TRAY.curr = 1; SN_TEAM_TRAY.curr <= SN_TEAM_TRAY.max; SN_TEAM_TRAY.curr++)
+ {
+ SN_TEAM_TRAY[SN_TEAM_TRAY.curr] = addArrayElement(Crd, Crd.last);
+ Crd[Crd.last-1].rleft = right_screen; Crd[Crd.last-1].rtop = bottom_screen;
+ Crd[Crd.last-1].rright = right_screen; Crd[Crd.last-1].rbottom = bottom_screen;
+ Crd[Crd.last-1].width = crd_portrait_sml_width;
+ Crd[Crd.last-1].height = crd_portrait_sml_height;
+ Crd[Crd.last-1].x = -(Crd[Crd.last-1].width/2);
- // Team Tray Button 2.
- crd_team_tray_2_width = crd_team_tray_1_width;
- crd_team_tray_2_height = crd_team_tray_1_height;
- crd_team_tray_2_x = crd_team_tray_1_x;
- crd_team_tray_2_y = crd_team_tray_1_y+crd_team_tray_2_height;
-
- // Team Tray Button 3.
- crd_team_tray_3_width = crd_team_tray_1_width;
- crd_team_tray_3_height = crd_team_tray_1_height;
- crd_team_tray_3_x = crd_team_tray_1_x;
- crd_team_tray_3_y = crd_team_tray_2_y+crd_team_tray_3_height;
-
- // Team Tray Button 4.
- crd_team_tray_4_width = crd_team_tray_1_width;
- crd_team_tray_4_height = crd_team_tray_1_height;
- crd_team_tray_4_x = crd_team_tray_1_x;
- crd_team_tray_4_y = crd_team_tray_3_y+crd_team_tray_4_height;
-
- // Team Tray Button 5.
- crd_team_tray_5_width = crd_team_tray_1_width;
- crd_team_tray_5_height = crd_team_tray_1_height;
- crd_team_tray_5_x = crd_team_tray_1_x;
- crd_team_tray_5_y = crd_team_tray_4_y+crd_team_tray_5_height;
-
- // Team Tray Button 6.
- crd_team_tray_6_width = crd_team_tray_1_width;
- crd_team_tray_6_height = crd_team_tray_1_height;
- crd_team_tray_6_x = crd_team_tray_1_x;
- crd_team_tray_6_y = crd_team_tray_5_y+crd_team_tray_6_height;
-
- // Team Tray Button 7.
- crd_team_tray_7_width = crd_team_tray_1_width;
- crd_team_tray_7_height = crd_team_tray_1_height;
- crd_team_tray_7_x = crd_team_tray_1_x;
- crd_team_tray_7_y = crd_team_tray_6_y+crd_team_tray_7_height;
-
- // Team Tray Button 8.
- crd_team_tray_8_width = crd_team_tray_1_width;
- crd_team_tray_8_height = crd_team_tray_1_height;
- crd_team_tray_8_x = crd_team_tray_1_x;
- crd_team_tray_8_y = crd_team_tray_7_y+crd_team_tray_8_height;
-
- // Team Tray Button 9.
- crd_team_tray_9_width = crd_team_tray_1_width;
- crd_team_tray_9_height = crd_team_tray_1_height;
- crd_team_tray_9_x = crd_team_tray_1_x;
- crd_team_tray_9_y = crd_team_tray_8_y+crd_team_tray_9_height;
+ if (SN_TEAM_TRAY.curr == 1)
+ Crd[Crd.last-1].y = Crd[SN_MINIMAP].height+(Crd[Crd.last-1].height/2);
+ else
+ Crd[Crd.last-1].y = Crd[Crd.last-2].y+Crd[Crd.last-2].width;
+ }
+ SN_TEAM_TRAY.last = SN_TEAM_TRAY.curr;
}
// ====================================================================
@@ -60,24 +25,13 @@ function initTeamTray()
function UpdateTeamTray()
{
// Enable a Team Tray icon if its group has been created.
- if (groups[1].length > 0) getGUIObjectByName("session_team_tray_1").hidden = false;
- else getGUIObjectByName("session_team_tray_1").hidden = true;
- if (groups[2].length > 0) getGUIObjectByName("session_team_tray_2").hidden = false;
- else getGUIObjectByName("session_team_tray_2").hidden = true;
- if (groups[3].length > 0) getGUIObjectByName("session_team_tray_3").hidden = false;
- else getGUIObjectByName("session_team_tray_3").hidden = true;
- if (groups[4].length > 0) getGUIObjectByName("session_team_tray_4").hidden = false;
- else getGUIObjectByName("session_team_tray_4").hidden = true;
- if (groups[5].length > 0) getGUIObjectByName("session_team_tray_5").hidden = false;
- else getGUIObjectByName("session_team_tray_5").hidden = true;
- if (groups[6].length > 0) getGUIObjectByName("session_team_tray_6").hidden = false;
- else getGUIObjectByName("session_team_tray_6").hidden = true;
- if (groups[7].length > 0) getGUIObjectByName("session_team_tray_7").hidden = false;
- else getGUIObjectByName("session_team_tray_7").hidden = true;
- if (groups[8].length > 0) getGUIObjectByName("session_team_tray_8").hidden = false;
- else getGUIObjectByName("session_team_tray_8").hidden = true;
- if (groups[9].length > 0) getGUIObjectByName("session_team_tray_9").hidden = false;
- else getGUIObjectByName("session_team_tray_9").hidden = true;
+ for (SN_TEAM_TRAY.curr = 1; SN_TEAM_TRAY.curr < SN_TEAM_TRAY.last; SN_TEAM_TRAY.curr++)
+ {
+ if (groups[SN_TEAM_TRAY.curr].length > 0)
+ getGUIObjectByName("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr).hidden = false;
+ else
+ getGUIObjectByName("SN_TEAM_TRAY_" + SN_TEAM_TRAY.curr).hidden = true;
+ }
}
// ====================================================================
\ No newline at end of file
diff --git a/binaries/data/mods/official/gui/test/functions_utility_coord.js b/binaries/data/mods/official/gui/test/functions_utility_coord.js
index 68384f840e..ba89704f41 100644
--- a/binaries/data/mods/official/gui/test/functions_utility_coord.js
+++ b/binaries/data/mods/official/gui/test/functions_utility_coord.js
@@ -244,6 +244,7 @@ function addSizeCoordArray(objectName, objectArrayElement, objectArrayElement_Fl
SizeCoord[SizeCoord.last].size2 = calcSizeArray(objectName, addSizeContainer);
SizeCoord.last++; // Increment counter for next entry.
+
}
// ====================================================================
diff --git a/binaries/data/mods/official/gui/test/styles.xml b/binaries/data/mods/official/gui/test/styles.xml
index af2c0973ac..89093c7371 100755
--- a/binaries/data/mods/official/gui/test/styles.xml
+++ b/binaries/data/mods/official/gui/test/styles.xml
@@ -44,13 +44,38 @@
tooltip="(TBA)"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+