diff --git a/binaries/data/mods/official/fonts/optimus12.tga b/binaries/data/mods/official/fonts/optimus12.tga index 675c6d6f18..284fff9c68 100644 Binary files a/binaries/data/mods/official/fonts/optimus12.tga and b/binaries/data/mods/official/fonts/optimus12.tga differ diff --git a/binaries/data/mods/official/fonts/optimus14b.fnt b/binaries/data/mods/official/fonts/optimus14b.fnt new file mode 100644 index 0000000000..18653c7e3f --- /dev/null +++ b/binaries/data/mods/official/fonts/optimus14b.fnt @@ -0,0 +1,100 @@ +100 +128 64 +96 +16 +32 0 64 1 0 0 0 3 +33 125 21 3 10 0 10 2 +34 99 25 4 5 0 11 3 +35 41 21 8 10 0 11 7 +36 65 22 6 11 0 10 5 +37 21 20 10 9 0 9 9 +38 106 10 11 10 0 10 10 +39 19 34 3 5 0 11 2 +40 28 30 4 10 0 10 3 +41 32 30 4 10 0 10 3 +42 7 34 5 4 0 10 4 +43 51 64 12 11 0 11 10 +44 124 45 3 3 0 2 2 +45 94 44 5 1 0 5 4 +46 48 23 3 2 0 2 2 +47 49 21 8 10 0 11 7 +48 71 20 8 9 0 9 7 +49 33 41 6 9 0 9 5 +50 91 20 7 9 0 9 6 +51 98 20 7 9 0 9 6 +52 79 20 8 9 0 9 7 +53 60 39 6 9 0 9 5 +54 118 20 7 9 0 9 6 +55 0 27 7 9 0 9 6 +56 105 27 7 9 0 9 6 +57 21 29 7 9 0 10 6 +58 66 39 3 6 0 6 2 +59 36 27 3 7 0 6 2 +60 117 25 4 5 0 8 3 +61 39 23 5 2 0 5 4 +62 121 25 4 5 0 8 3 +63 27 42 6 10 0 10 5 +64 89 53 11 9 0 9 10 +65 63 64 12 11 0 11 11 +66 118 11 9 11 0 10 8 +67 84 11 11 11 0 11 10 +68 75 64 12 11 0 10 11 +69 100 53 8 11 0 11 7 +70 108 53 8 11 0 11 7 +71 87 64 12 11 0 11 11 +72 32 11 13 11 0 10 11 +73 123 64 5 11 0 10 4 +74 63 53 6 14 -1 10 4 +75 99 64 12 11 0 10 11 +76 116 53 8 11 0 10 7 +77 17 11 15 11 0 11 14 +78 45 11 13 11 0 11 12 +79 58 11 13 11 0 11 11 +80 12 22 9 11 0 10 7 +81 0 64 22 14 0 11 12 +82 111 64 12 11 0 10 11 +83 34 52 7 11 0 11 6 +84 69 53 10 11 0 11 9 +85 22 53 12 11 0 10 11 +86 71 11 13 11 0 10 12 +87 22 64 16 11 0 10 15 +88 95 11 11 11 0 10 10 +89 51 53 12 11 0 10 11 +90 79 53 10 11 0 11 9 +91 71 30 4 10 0 10 3 +92 57 21 8 10 0 11 7 +93 75 30 4 10 0 10 3 +94 79 25 8 5 0 10 7 +95 91 21 8 1 0 -2 6 +96 44 23 4 2 0 12 3 +97 0 42 9 8 0 9 8 +98 12 34 7 8 0 9 6 +99 9 42 9 8 0 9 8 +100 41 52 10 8 0 9 8 +101 79 34 6 8 0 9 5 +102 94 34 6 8 0 9 5 +103 18 42 9 8 0 9 8 +104 0 50 10 8 0 9 9 +105 124 53 4 8 0 9 3 +106 89 44 5 11 -1 9 3 +107 51 42 9 8 0 9 8 +108 45 34 7 8 0 9 5 +109 0 18 12 8 0 9 11 +110 10 50 10 8 0 9 9 +111 31 20 10 9 0 9 9 +112 52 34 7 8 0 9 6 +113 0 10 17 10 0 9 9 +114 69 42 9 8 0 9 8 +115 39 36 6 9 0 9 5 +116 112 42 8 8 0 9 7 +117 78 42 9 8 0 9 8 +118 41 44 10 8 0 9 9 +119 106 18 12 8 0 9 11 +120 94 42 9 8 0 9 8 +121 103 42 9 8 0 9 8 +122 120 42 8 8 0 9 7 +123 7 28 5 10 0 10 4 +124 87 22 4 11 -1 11 1 +125 112 28 5 10 0 10 3 +126 0 34 7 4 1 7 8 +65533 38 64 13 12 1 11 14 diff --git a/binaries/data/mods/official/fonts/optimus14b.tga b/binaries/data/mods/official/fonts/optimus14b.tga new file mode 100644 index 0000000000..92a4abf18f Binary files /dev/null and b/binaries/data/mods/official/fonts/optimus14b.tga differ diff --git a/binaries/data/mods/official/gui/test/4_session.xml b/binaries/data/mods/official/gui/test/4_session.xml index a20558e99c..6a69493820 100644 --- a/binaries/data/mods/official/gui/test/4_session.xml +++ b/binaries/data/mods/official/gui/test/4_session.xml @@ -416,6 +416,49 @@ ]]> + + + + + + + + + + + @@ -552,39 +595,29 @@ z="100" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - diff --git a/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js b/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js index 12aab602be..e4ca72fc9c 100644 --- a/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js +++ b/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js @@ -75,9 +75,6 @@ function defineCommandButtons(command) default: var buttonX = getCrd ("snStatusPaneCommand" + (snStatusPaneCommand.split+1) + "_" + listLoop).coord[rb].x; var buttonY = currCrd.coord[rb].y + 3; - - var barX = buttonX; - var barY = buttonY; break; } @@ -92,6 +89,8 @@ function defineCommandButtons(command) +snStatusPaneCommand.span; var buttonY = parentTab.coord[rb].y; } + var barX = buttonX; + var barY = 0; } else // If we're doing the row of tabs, { @@ -126,8 +125,6 @@ function defineCommandButtons(command) buttonWidth, 4); getGUIObjectByName ("snStatusPaneCommand" + tabLoop + "_" + listLoop + "Bar").hidden = false; getGUIObjectByName ("snStatusPaneCommand" + tabLoop + "_" + listLoop + "Bar").caption = 100; - -//console.write ("Done health bar " + "snStatusPaneCommand" + tabLoop + "_" + listLoop + "Bar:" + buttonX + " " + buttonY); } /* // Store indexes to the button for easy future reference. @@ -419,13 +416,18 @@ function refreshCommandButtons() } // Update Barter. (Tab button, persistent buttons, click them to do things.) -// updateTab ("barter", "production", "", selection[0].actions.barter.list); + if (selection[0].actions && selection[0].actions.barter && selection[0].actions.barter.list) + updateTab ("barter", "production", "", selection[0].actions.barter.list); // Update pick lists (formation, stance, trade). (Tab button holds current selection, click a button to select a new option and close the tab.) -// updateTab ("formation", "pick", "", selection[0].traits.formation.type, selection[0].traits.formation.curr); -// updateTab ("stance", "pick", "", selection[0].traits.ai.stance.list, selection[0].traits.ai.stance.curr); -// updateTab ("trade", "pick", "", selection[0].actions.trade.list, selection[0].actions.trade.curr); -// updateTab ("gate", "pick", "", selection[0].actions.gate.list, selection[0].actions.gate.curr); + if (selection[0].traits && selection[0].traits.formation && selection[0].traits.formation.type && selection[0].traits.formation.curr) + updateTab ("formation", "pick", "", selection[0].traits.formation.type, selection[0].traits.formation.curr); + if (selection[0].traits && selection[0].traits.ai && selection[0].traits.ai.stance && selection[0].traits.ai.stance.list && selection[0].traits.ai.stance.curr) + updateTab ("stance", "pick", "", selection[0].traits.ai.stance.list, selection[0].traits.ai.stance.curr); + if (selection[0].actions && selection[0].actions.trade && selection[0].actions.trade.list && selection[0].actions.trade.curr) + updateTab ("trade", "pick", "", selection[0].actions.trade.list, selection[0].actions.trade.curr); + if (selection[0].actions && selection[0].actions.gate && selection[0].actions.gate.list && selection[0].actions.gate.list.curr) + updateTab ("gate", "pick", "", selection[0].actions.gate.list, selection[0].actions.gate.curr); // Update research. (Tab button, persistent buttons, click them to do things.) updateTab ("research", "production", "", selection[0].actions.create.list.research, ""); @@ -471,6 +473,19 @@ function refreshCommandButtons() } } + // Do the selection/garrison list. + tabCounter = snStatusPaneCommand.tab.max; + // If there are entities garrisoned in the current entity, + if (selection[0].traits.garrison && selection[0].traits.garrison.curr > 0) + { + updateTab ("garrison", "production", "", selection, ""); + } + else + { + // If more than one entity is selected, list them. + if (selection.length > 1) + updateTab ("selection", "production", "", selection, ""); + } } diff --git a/binaries/data/mods/official/gui/test/functions_page_session_status_pane.js b/binaries/data/mods/official/gui/test/functions_page_session_status_pane.js index f6b2c3fcaf..646bce13d7 100644 --- a/binaries/data/mods/official/gui/test/functions_page_session_status_pane.js +++ b/binaries/data/mods/official/gui/test/functions_page_session_status_pane.js @@ -74,7 +74,7 @@ function refreshStatusPane() textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getColour().r*255) + ' ' + Math.round(selection[0].player.getColour().g*255) + ' ' + Math.round(selection[0].player.getColour().b*255) + '"]' + selection[0].player.name + '[/color][/font]\n'; textCaption += "[font=verdana10][color=white]" + selection[0].traits.id.civ + "[/color][/font]\n"; textCaption += "[font=verdana10][color=white]" + selection[0].traits.id.specific + "[/color][/font]\n"; - textCaption += "[font=optimus12][color=gold]" + selection[0].traits.id.generic + "[/color][/font]"; + textCaption += "[font=optimus14b][color=gold]" + selection[0].traits.id.generic + "[/color][/font]"; getGUIObjectByName ("snStatusPaneText").caption = textCaption; } @@ -142,9 +142,38 @@ textCaption += '[font=verdana10][color="' + Math.round(selection[0].player.getCo getGUIObjectByName ("snStatusPaneSupplyIcon").hidden = true; } } + + // Update statistic icons. + statCurr = 1; + if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.melee && selection[0].actions.attack.melee.damage) + updateStat ("snStatusPaneStat_", "Attack", "rating", selection[0].actions.attack.melee.damage); + if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.melee && selection[0].actions.attack.melee.range) + updateStat ("snStatusPaneStat_", "Statistic", "range", selection[0].actions.attack.melee.range); + if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.ranged && selection[0].actions.attack.ranged.damage) + updateStat ("snStatusPaneStat_", "Attack", "rating", selection[0].actions.attack.ranged.damage); + if (selection[0].actions && selection[0].actions.attack && selection[0].actions.attack.ranged && selection[0].actions.attack.ranged.range) + updateStat ("snStatusPaneStat_", "Statistic", "range", selection[0].actions.attack.ranged.range); + if (selection[0].traits && selection[0].traits.armour && selection[0].traits.armour.value) + updateStat ("snStatusPaneStat_", "Armour", "rating", selection[0].traits.armour.value); + if (selection[0].traits && selection[0].traits.vision && selection[0].traits.vision.los) + updateStat ("snStatusPaneStat_", "Statistic", "vision", selection[0].traits.vision.los); // Refresh command buttons. refreshCommandButtons(); } // ==================================================================== + +function updateStat (baseName, cellSheet, cell, statistic) +{ + textStat = getGUIObjectByName (baseName + statCurr); + textStat.sprite = "snIconSheet" + cellSheet; + textStat.cell_id = cellGroup[cellSheet][cell].id; + textStat.tooltip = cellGroup[cellSheet][cell].name; + iconStat = getGUIObjectByName (baseName + (statCurr + 1)) + iconStat.caption = statistic; + iconStat.tooltip = cellGroup[cellSheet][cell].name + ": " + statistic + "."; + statCurr = (statCurr + 2); +} + +// ==================================================================== diff --git a/binaries/data/mods/official/gui/test/functions_sim_player.js b/binaries/data/mods/official/gui/test/functions_sim_player.js index b13f314dd6..fc788c9cb8 100644 --- a/binaries/data/mods/official/gui/test/functions_sim_player.js +++ b/binaries/data/mods/official/gui/test/functions_sim_player.js @@ -274,15 +274,8 @@ function refreshResource (resourceName, resourceIndex) if (coordGroup == GUIType) { // Update counter size. -// resourceObject.size = Crd[getCrd(resourceObject.name, true)].size[GUIType]; -// resourceIconObject.size = Crd[getCrd(resourceIconObject.name, true)].size[GUIType]; - resourceObject.size = Crd[crdResult].size[GUIType]; resourceIconObject.size = Crd[crdIconResult].size[GUIType]; - - console.write (resourceName + " Counter: " + resourceObject.size); - console.write (resourceName + " Icon: " + resourceIconObject.size); - } } } diff --git a/binaries/data/mods/official/gui/test/styles.xml b/binaries/data/mods/official/gui/test/styles.xml index 35204ea67a..932e5bf7f6 100755 --- a/binaries/data/mods/official/gui/test/styles.xml +++ b/binaries/data/mods/official/gui/test/styles.xml @@ -493,7 +493,16 @@ ghost="true" sprite="snIconSheetResource" z="100" - /> + /> + +