diff --git a/binaries/data/mods/official/gui/test/3_session.xml b/binaries/data/mods/official/gui/test/3_session.xml index e51066a318..1e42d88f53 100755 --- a/binaries/data/mods/official/gui/test/3_session.xml +++ b/binaries/data/mods/official/gui/test/3_session.xml @@ -27,7 +27,7 @@ GUIObjectToggle("session_group_pane"); ]]> - + + + + + + - - - - - + + + + + + + + + diff --git a/binaries/data/mods/official/gui/test/functions_manual.js b/binaries/data/mods/official/gui/test/functions_manual.js index c69b7ce4c9..b5d3676398 100755 --- a/binaries/data/mods/official/gui/test/functions_manual.js +++ b/binaries/data/mods/official/gui/test/functions_manual.js @@ -137,6 +137,13 @@ function manualDisplay() ManualRollover.caption += "TurnRadius: " + selection[0].actions.move.turningradius + "\n"; } + // Vision. + if (selection[0].traits.vision) + { + if (selection[0].traits.vision.los) + ManualRollover.caption += "LOS: " + selection[0].traits.vision.los + "\n"; + } + // Classes. if (selection[0].traits.id.class1) ManualRollover.caption += "Class1: " + selection[0].traits.id.class1 + "\n"; 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 58aead4e7d..ff73031228 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 @@ -20,10 +20,10 @@ 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 + AddGroupPaneRow(0, 24, 100, -62); // Row 0 + AddGroupPaneRow(0, 70, 100, -102); // Row 1 + AddGroupPaneRow(0, 116, 100, -148); // Row 2 + AddGroupPaneRow(0, 162, 100, -194); // Row 3 AddGroupPaneCol(50, -16, 50, -16); // Col 0 AddGroupPaneCol(50, -52, 50, -52); // Col 1 AddGroupPaneCol(50, 20, 50, 20); // Col 2 @@ -35,10 +35,8 @@ function initGroupPaneTable() 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 + AddGroupPaneCol(50, 200, 50, 200); // Col 11 + AddGroupPaneCol(50, 236, 50, 236); // Col 12 } // ==================================================================== @@ -126,28 +124,41 @@ function UpdateGroupPane() getGUIObjectByName("session_group_pane").hidden = false; // Set size of Group Pane background. - if (selection.length <= 15) + if (selection.length <= 13) { switch (GUIType) { case "top": - setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+86"); + setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+86"); break; case "bottom": - setSize("session_group_pane_bg", "0%+20 100%-86 100%-20 100%"); + setSize("session_group_pane_bg", "50%-215 100%-86 50%+285 100%"); break; } } else - if (selection.length > 15 && selection.length <= 30) + if (selection.length > 13 && selection.length <= 26) { switch (GUIType) { case "top": - setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+127"); + setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+127"); break; case "bottom": - setSize("session_group_pane_bg", "0%+20 100%-127 100%-20 100%"); + setSize("session_group_pane_bg", "50%-215 100%-127 50%+285 100%"); + break; + } + } + else + if (selection.length > 26 && selection.length <= 39) + { + switch (GUIType) + { + case "top": + setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+168"); + break; + case "bottom": + setSize("session_group_pane_bg", "50%-215 100%-168 50%+285 100%"); break; } } @@ -156,10 +167,10 @@ function UpdateGroupPane() switch (GUIType) { case "top": - setSize("session_group_pane_bg", "0%+20 0% 100%-20 0%+168"); + setSize("session_group_pane_bg", "50%-215 0% 50%+285 0%+209"); break; case "bottom": - setSize("session_group_pane_bg", "0%+20 100%-168 100%-20 100%"); + setSize("session_group_pane_bg", "50%-215 100%-209 50%+285 100%"); break; } } 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 84058dbaf5..98a383184a 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 @@ -3,12 +3,18 @@ function initStatusOrb() // Status Orb background. crd_status_orb_bkg_x = 0; crd_status_orb_bkg_y = 0; - crd_status_orb_bkg_width = 184; - crd_status_orb_bkg_height = crd_status_orb_bkg_width; + crd_status_orb_bkg_width = 255; + crd_status_orb_bkg_height = 170; + + // Heading. + crd_status_orb_heading_width = crd_status_orb_bkg_width; + crd_status_orb_heading_height = 14; + crd_status_orb_heading_x = crd_status_orb_bkg_x+2; + crd_status_orb_heading_y = crd_status_orb_bkg_y; // Status Orb large portrait. - crd_status_orb_portrait_x = 7; - crd_status_orb_portrait_y = 6; + crd_status_orb_portrait_x = crd_status_orb_heading_x+5; + crd_status_orb_portrait_y = crd_status_orb_heading_y+crd_status_orb_heading_height+5; crd_status_orb_portrait_width = crd_portrait_lrg_width; crd_status_orb_portrait_height = crd_portrait_lrg_height; @@ -18,6 +24,12 @@ function initStatusOrb() crd_status_orb_rank_x = crd_status_orb_portrait_x+crd_status_orb_portrait_width-crd_status_orb_rank_width; crd_status_orb_rank_y = crd_status_orb_portrait_y; + // Name1. + crd_status_orb_name1_width = crd_status_orb_bkg_width-crd_status_orb_portrait_width-10; + crd_status_orb_name1_height = crd_status_orb_portrait_height; + crd_status_orb_name1_x = crd_status_orb_portrait_x+crd_status_orb_portrait_width+2; + crd_status_orb_name1_y = crd_status_orb_portrait_y; + // Status Orb health bar. crd_status_orb_hpbar_span = 2; crd_status_orb_hpbar_x = crd_status_orb_portrait_x; @@ -28,9 +40,9 @@ function initStatusOrb() // Status Orb health text. crd_status_orb_hpbar_text_span_x = 4; crd_status_orb_hpbar_text_span_y = 0; - crd_status_orb_hpbar_text_x = crd_status_orb_hpbar_x+crd_status_orb_hpbar_width+crd_status_orb_hpbar_text_span_x; + crd_status_orb_hpbar_text_x = crd_status_orb_name1_x; crd_status_orb_hpbar_text_y = crd_status_orb_hpbar_y+crd_status_orb_hpbar_text_span_y; - crd_status_orb_hpbar_text_width = 100; + crd_status_orb_hpbar_text_width = 55; crd_status_orb_hpbar_text_height = crd_status_orb_hpbar_height; // Status Orb xp bar. @@ -40,7 +52,7 @@ function initStatusOrb() crd_status_orb_xpbar_height = crd_status_orb_hpbar_height; // Status Orb xp text. - crd_status_orb_xpbar_text_x = crd_status_orb_xpbar_x+crd_status_orb_xpbar_width+crd_status_orb_hpbar_text_span_x; + crd_status_orb_xpbar_text_x = crd_status_orb_hpbar_text_x; crd_status_orb_xpbar_text_y = crd_status_orb_xpbar_y+crd_status_orb_hpbar_text_span_y; crd_status_orb_xpbar_text_width = crd_status_orb_hpbar_text_width; crd_status_orb_xpbar_text_height = crd_status_orb_hpbar_text_height; @@ -48,40 +60,22 @@ function initStatusOrb() // Garrison counter. crd_status_orb_garrison_span_x = 5; crd_status_orb_garrison_span_y = 2; - crd_status_orb_garrison_x = crd_status_orb_portrait_x+crd_status_orb_portrait_width+crd_status_orb_garrison_span_x; - crd_status_orb_garrison_y = crd_status_orb_portrait_y+crd_status_orb_garrison_span_y; crd_status_orb_garrison_width = 65; crd_status_orb_garrison_height = 30; + crd_status_orb_garrison_x = crd_status_orb_hpbar_text_x+crd_status_orb_hpbar_text_width; + crd_status_orb_garrison_y = crd_status_orb_hpbar_y-(crd_status_orb_garrison_height/3); // Supply counter. - crd_status_orb_supply_x = crd_status_orb_garrison_x; - crd_status_orb_supply_y = crd_status_orb_garrison_y+crd_status_orb_garrison_height-2; - crd_status_orb_supply_width = crd_status_orb_garrison_width+20; + crd_status_orb_supply_x = crd_status_orb_garrison_x+crd_status_orb_garrison_width; + crd_status_orb_supply_y = crd_status_orb_garrison_y; + crd_status_orb_supply_width = crd_status_orb_garrison_width-4; crd_status_orb_supply_height = crd_status_orb_garrison_height; - // Name3. - crd_status_orb_name3_width = 252; - crd_status_orb_name3_height = 14; - crd_status_orb_name3_x = crd_status_orb_bkg_x+2; - crd_status_orb_name3_y = crd_status_orb_bkg_y+crd_status_orb_bkg_height-crd_status_orb_name3_height-8; - - // Name2. - crd_status_orb_name2_width = crd_status_orb_name3_width; - crd_status_orb_name2_height = crd_status_orb_name3_height+1; - crd_status_orb_name2_x = crd_status_orb_name3_x; - crd_status_orb_name2_y = crd_status_orb_name3_y-crd_status_orb_name2_height; - - // Name1. - crd_status_orb_name1_width = crd_status_orb_name2_width; - crd_status_orb_name1_height = crd_status_orb_name2_height; - crd_status_orb_name1_x = crd_status_orb_name2_x; - crd_status_orb_name1_y = crd_status_orb_name2_y-crd_status_orb_name1_height+1; - // Attack. - crd_status_orb_attack_width = crd_status_orb_bkg_width; - crd_status_orb_attack_height = ((crd_status_orb_name1_y)-(crd_status_orb_xpbar_y+crd_status_orb_xpbar_height))/2; - crd_status_orb_attack_x = crd_status_orb_name3_x; - crd_status_orb_attack_y = crd_status_orb_xpbar_y+crd_status_orb_xpbar_height-1; + crd_status_orb_attack_width = crd_status_orb_bkg_width-8; + crd_status_orb_attack_height = 22; + crd_status_orb_attack_x = crd_status_orb_portrait_x; + crd_status_orb_attack_y = crd_status_orb_xpbar_y+crd_status_orb_xpbar_height; // Armour. crd_status_orb_armour_width = crd_status_orb_attack_width; @@ -89,71 +83,90 @@ function initStatusOrb() crd_status_orb_armour_x = crd_status_orb_attack_x; crd_status_orb_armour_y = crd_status_orb_attack_y+crd_status_orb_attack_height; + // Other. + crd_status_orb_other_width = crd_status_orb_armour_width; + crd_status_orb_other_height = crd_status_orb_armour_height; + crd_status_orb_other_x = crd_status_orb_armour_x; + crd_status_orb_other_y = crd_status_orb_armour_y+crd_status_orb_armour_height; + // Command Button 1. crd_status_orb_command_1_width = crd_portrait_sml_width; crd_status_orb_command_1_height = crd_portrait_sml_height; crd_status_orb_command_1_x = 0; - crd_status_orb_command_1_y = crd_status_orb_bkg_height; + crd_status_orb_command_1_y = crd_status_orb_bkg_height+1; + crd_status_orb_command_span = 2; // Command Button 2. crd_status_orb_command_2_width = crd_status_orb_command_1_width; crd_status_orb_command_2_height = crd_status_orb_command_1_height; - crd_status_orb_command_2_x = crd_status_orb_command_1_x+crd_status_orb_command_1_width; + crd_status_orb_command_2_x = crd_status_orb_command_1_x+crd_status_orb_command_1_width+crd_status_orb_command_span; crd_status_orb_command_2_y = crd_status_orb_command_1_y; // Command Button 3. crd_status_orb_command_3_width = crd_status_orb_command_1_width; crd_status_orb_command_3_height = crd_status_orb_command_1_height; - crd_status_orb_command_3_x = crd_status_orb_command_2_x+crd_status_orb_command_2_width; + crd_status_orb_command_3_x = crd_status_orb_command_2_x+crd_status_orb_command_2_width+crd_status_orb_command_span; crd_status_orb_command_3_y = crd_status_orb_command_2_y; // Command Button 4. crd_status_orb_command_4_width = crd_status_orb_command_1_width; crd_status_orb_command_4_height = crd_status_orb_command_1_height; - crd_status_orb_command_4_x = crd_status_orb_command_3_x+crd_status_orb_command_3_width; - crd_status_orb_command_4_y = crd_status_orb_command_3_y-3; + crd_status_orb_command_4_x = crd_status_orb_command_3_x+crd_status_orb_command_3_width+crd_status_orb_command_span; + crd_status_orb_command_4_y = crd_status_orb_command_3_y; // Command Button 5. crd_status_orb_command_5_width = crd_status_orb_command_1_width; crd_status_orb_command_5_height = crd_status_orb_command_1_height; - crd_status_orb_command_5_x = crd_status_orb_command_4_x+crd_status_orb_command_4_width-1; - crd_status_orb_command_5_y = crd_status_orb_command_4_y-10; + crd_status_orb_command_5_x = crd_status_orb_command_4_x+crd_status_orb_command_4_width+crd_status_orb_command_span; + crd_status_orb_command_5_y = crd_status_orb_command_4_y; // Command Button 6. crd_status_orb_command_6_width = crd_status_orb_command_1_width; crd_status_orb_command_6_height = crd_status_orb_command_1_height; - crd_status_orb_command_6_x = crd_status_orb_command_5_x+crd_status_orb_command_5_width-7; - crd_status_orb_command_6_y = crd_status_orb_command_5_y-20; + crd_status_orb_command_6_x = crd_status_orb_command_5_x+crd_status_orb_command_5_width+crd_status_orb_command_span; + crd_status_orb_command_6_y = crd_status_orb_command_5_y; // Command Button 7. crd_status_orb_command_7_width = crd_status_orb_command_1_width; crd_status_orb_command_7_height = crd_status_orb_command_1_height; - crd_status_orb_command_7_x = crd_status_orb_command_6_x+crd_status_orb_command_6_width-12; - crd_status_orb_command_7_y = crd_status_orb_command_6_y-25; + crd_status_orb_command_7_x = crd_status_orb_command_6_x+crd_status_orb_command_6_width+crd_status_orb_command_span; + crd_status_orb_command_7_y = crd_status_orb_command_6_y; // Command Button 8. crd_status_orb_command_8_width = crd_status_orb_command_1_width; crd_status_orb_command_8_height = crd_status_orb_command_1_height; - crd_status_orb_command_8_x = crd_status_orb_command_7_x+crd_status_orb_command_7_width-21; - crd_status_orb_command_8_y = crd_status_orb_command_7_y-31; + crd_status_orb_command_8_x = crd_status_orb_command_7_x+crd_status_orb_command_7_width+crd_status_orb_command_span; + crd_status_orb_command_8_y = crd_status_orb_command_7_y-crd_status_orb_command_span-8; // Command Button 9. crd_status_orb_command_9_width = crd_status_orb_command_1_width; crd_status_orb_command_9_height = crd_status_orb_command_1_height; - crd_status_orb_command_9_x = crd_status_orb_command_8_x+crd_status_orb_command_8_width-32; - crd_status_orb_command_9_y = crd_status_orb_command_8_y-33; + crd_status_orb_command_9_x = crd_status_orb_command_8_x+(crd_status_orb_command_8_width/2)+crd_status_orb_command_span; + crd_status_orb_command_9_y = crd_status_orb_command_8_y+4-crd_status_orb_command_8_height-crd_status_orb_command_span; // Command Button 10. crd_status_orb_command_10_width = crd_status_orb_command_1_width; crd_status_orb_command_10_height = crd_status_orb_command_1_height; - crd_status_orb_command_10_x = crd_status_orb_command_9_x+crd_status_orb_command_9_width-41; - crd_status_orb_command_10_y = crd_status_orb_command_9_y-32; + crd_status_orb_command_10_x = crd_status_orb_command_9_x; + crd_status_orb_command_10_y = crd_status_orb_command_9_y-crd_status_orb_command_9_height-(crd_status_orb_command_span/2); // Command Button 11. crd_status_orb_command_11_width = crd_status_orb_command_1_width; crd_status_orb_command_11_height = crd_status_orb_command_1_height; - crd_status_orb_command_11_x = crd_status_orb_command_10_x+crd_status_orb_command_10_width-52; - crd_status_orb_command_11_y = crd_status_orb_command_10_y-28; + crd_status_orb_command_11_x = crd_status_orb_command_10_x; + crd_status_orb_command_11_y = crd_status_orb_command_10_y-crd_status_orb_command_10_height-(crd_status_orb_command_span/2); + + // Command Button 12. + crd_status_orb_command_12_width = crd_status_orb_command_1_width; + crd_status_orb_command_12_height = crd_status_orb_command_1_height; + crd_status_orb_command_12_x = crd_status_orb_command_11_x; + crd_status_orb_command_12_y = crd_status_orb_command_11_y-crd_status_orb_command_11_height-(crd_status_orb_command_span/2); + + // Command Button 13. + crd_status_orb_command_13_width = crd_status_orb_command_1_width; + crd_status_orb_command_13_height = crd_status_orb_command_1_height; + crd_status_orb_command_13_x = crd_status_orb_command_12_x; + crd_status_orb_command_13_y = crd_status_orb_command_12_y-crd_status_orb_command_12_height-(crd_status_orb_command_span/2); } // ==================================================================== @@ -161,36 +174,28 @@ function initStatusOrb() function UpdateStatusOrb() { // Update name text. + GUIObject = getGUIObjectByName("session_panel_status_name1"); + GUIObject.caption = ""; // 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"); + GUIObject.caption += selection[0].traits.id.personal + "\n"; } // 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 = ""; + GUIObject.caption += selection[0].traits.id.generic + "\n"; } // Specific/ranked name. if (selection[0].traits.id.ranked) { - GUIObject = getGUIObjectByName("session_panel_status_name3"); - GUIObject.caption = selection[0].traits.id.ranked + "\n"; + GUIObject = getGUIObjectByName("session_panel_status_name1"); + 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"; + GUIObject.caption += selection[0].traits.id.specific + "\n"; } } @@ -242,18 +247,33 @@ function UpdateStatusOrb() // Update stats if (selection[0].actions.attack && selection[0].actions.attack.damage && selection[0].actions.attack.damage > 0 && selection[0].actions.attack.crush && selection[0].actions.attack.hack && selection[0].actions.attack.pierce) { - getGUIObjectByName("session_panel_status_attack").caption = "[icon=icon_statistic_attack]" + selection[0].actions.attack.damage + " [icon=icon_statistic_hack]" + Math.round(selection[0].actions.attack.hack*100) + "[icon=icon_statistic_pierce]" + Math.round(selection[0].actions.attack.pierce*100) + "[icon=icon_statistic_crush]" + Math.round(selection[0].actions.attack.crush*100) + ""; + getGUIObjectByName("session_panel_status_attack").caption = "[icon=icon_statistic_attack]" + selection[0].actions.attack.damage + " [icon=icon_statistic_hack]" + Math.round(selection[0].actions.attack.hack*100) + "% [icon=icon_statistic_pierce]" + Math.round(selection[0].actions.attack.pierce*100) + "% [icon=icon_statistic_crush]" + Math.round(selection[0].actions.attack.crush*100) + "%"; } else getGUIObjectByName("session_panel_status_attack").caption = ""; if (selection[0].traits.armour && selection[0].traits.armour.value && selection[0].traits.armour.value > 0 && selection[0].traits.armour.crush && selection[0].traits.armour.hack && selection[0].traits.armour.pierce) { - getGUIObjectByName("session_panel_status_armour").caption = "[icon=icon_statistic_armour]" + selection[0].traits.armour.value + " [icon=icon_statistic_hack]" + Math.round(selection[0].traits.armour.hack*100) + "[icon=icon_statistic_pierce]" + Math.round(selection[0].traits.armour.pierce*100) + "[icon=icon_statistic_crush]" + Math.round(selection[0].traits.armour.crush*100) + ""; + getGUIObjectByName("session_panel_status_armour").caption = "[icon=icon_statistic_armour]" + selection[0].traits.armour.value + " [icon=icon_statistic_hack]" + Math.round(selection[0].traits.armour.hack*100) + "% [icon=icon_statistic_pierce]" + Math.round(selection[0].traits.armour.pierce*100) + "% [icon=icon_statistic_crush]" + Math.round(selection[0].traits.armour.crush*100) + "%"; } else getGUIObjectByName("session_panel_status_armour").caption = ""; + GUIObject = getGUIObjectByName("session_panel_status_other"); + GUIObject.caption = ""; + if (selection[0].actions.attack && selection[0].actions.attack.range) + { + GUIObject.caption += "[icon=icon_statistic_accuracy]" + selection[0].actions.attack.range + " "; + } + if (selection[0].actions.move && selection[0].actions.move.speed) + { + GUIObject.caption += "[icon=icon_statistic_speed]" + selection[0].actions.move.speed + " "; + } + if (selection[0].traits.vision && selection[0].traits.vision.los) + { + GUIObject.caption += "[icon=icon_statistic_los]" + selection[0].traits.vision.los + " "; + } + // Reveal Status Orb getGUIObjectByName("session_status_orb").hidden = false; } diff --git a/binaries/data/mods/official/gui/test/setup.xml b/binaries/data/mods/official/gui/test/setup.xml index 8ae32faf93..f7fe7111b2 100755 --- a/binaries/data/mods/official/gui/test/setup.xml +++ b/binaries/data/mods/official/gui/test/setup.xml @@ -66,6 +66,7 @@ + - + - +