Fixed menu graphics
Misc consistency improvements Added pause hotkey This was SVN commit r8204.
This commit is contained in:
parent
ac11a5cf28
commit
b2278e56a6
@ -99,7 +99,7 @@ function displayGeneralInfo(entState, template)
|
||||
|
||||
// Set Captions
|
||||
getGUIObjectByName("specific").caption = specificName;
|
||||
getGUIObjectByName("player").caption = civName == GAIA? playerName : playerName + " (" + civName + ")";
|
||||
getGUIObjectByName("player").caption = civName == GAIA? playerName : playerName + " (" + civName + ")"; // Don't need civ tooltip for Gaia Player - redundant
|
||||
getGUIObjectByName("player").textcolor = playerColor;
|
||||
|
||||
|
||||
@ -116,12 +116,11 @@ function displayGeneralInfo(entState, template)
|
||||
}
|
||||
|
||||
// Tooltips
|
||||
// getGUIObjectByName("sdSpecific").tooltip = genericName;
|
||||
// getGUIObjectByName("specific").tooltip = genericName;
|
||||
getGUIObjectByName("health").tooltip = hitpoints;
|
||||
getGUIObjectByName("attackIcon").tooltip = damageTypesToText(entState.attack);
|
||||
getGUIObjectByName("armourIcon").tooltip = damageTypesToText(entState.armour);
|
||||
|
||||
// getGUIObjectByName("player").tooltip = civName != GAIA? civName : ""; // Don't need civ tooltip for Gaia Player - redundant
|
||||
getGUIObjectByName("health").tooltip = hitpoints;
|
||||
|
||||
// Icon Tooltip
|
||||
var iconTooltip = "";
|
||||
|
@ -116,20 +116,9 @@ function onTick()
|
||||
|
||||
// When training is blocked, flash population (alternates colour every 500msec)
|
||||
if (g_IsTrainingQueueBlocked && (Date.now() % 1000) < 500)
|
||||
getGUIObjectByName("populationWarning").hidden = false;
|
||||
else
|
||||
getGUIObjectByName("populationWarning").hidden = true;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// When training is blocked, flash population (alternates colour every 500msec)
|
||||
if (g_IsTrainingQueueBlocked && (Date.now() % 1000) < 500)
|
||||
getGUIObjectByName("resourcePop").textcolor = "255 0 0";
|
||||
getGUIObjectByName("resourcePop").textcolor = "255 165 0";
|
||||
else
|
||||
getGUIObjectByName("resourcePop").textcolor = "white";
|
||||
*/
|
||||
}
|
||||
|
||||
function onSimulationUpdate()
|
||||
|
@ -58,6 +58,11 @@
|
||||
<action on="Press">toggleChatWindow();</action>
|
||||
</object>
|
||||
|
||||
<!-- Depending on the current state, it either opens message window or closes message window / posts message -->
|
||||
<object hotkey="pause">
|
||||
<action on="Press">togglePause();</action>
|
||||
</object>
|
||||
|
||||
<!-- Delete button Hotkey (For some reason it won't work when the console is visible -->
|
||||
<object hotkey="killUnit">
|
||||
<action on="Press">performCommand(g_Selection.toList()[0], "delete");</action>
|
||||
@ -158,7 +163,7 @@
|
||||
|
||||
<!-- Chat window -->
|
||||
<object name="chatWindow" size="50%-200 50%-46 50%+200 50%+46" type="image" hidden="true" z="10" style="sessionPanel">
|
||||
<object name="chatInput" size="12 12 100%-12 36" type="input" style="wheatInput" max_length="80">
|
||||
<object name="chatInput" size="16 12 100%-16 36" type="input" style="chatInput" max_length="80">
|
||||
<action on="Press">submitChatInput();</action>
|
||||
</object>
|
||||
|
||||
@ -173,6 +178,79 @@
|
||||
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Menu -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="menuPanel"
|
||||
size="50%-74 50%-180 50%+74 50%+20"
|
||||
type="image"
|
||||
style="sessionPanel"
|
||||
hidden="true"
|
||||
>
|
||||
<object size="0 0 100% 32" type="text" style="largeBoldCenteredText">Menu</object >
|
||||
|
||||
<object size="0 32 100% 100%">
|
||||
<!-- Settings button -->
|
||||
<object type="button"
|
||||
name="settingsButton"
|
||||
style="wheatButtonFancy"
|
||||
size="50%-60 0 50%+60 32"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="centeredText" name="settingsButtonText" ghost="true">Settings</object>
|
||||
<action on="Press">toggleSettingsWindow();</action>
|
||||
</object>
|
||||
|
||||
<!-- Chat button -->
|
||||
<object type="button"
|
||||
name="chatButton"
|
||||
style="wheatButtonFancy"
|
||||
size="50%-60 32 50%+60 64"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="centeredText" name="chatButtonText" ghost="true">Chat</object>
|
||||
<action on="Press">toggleChatWindow();</action>
|
||||
</object>
|
||||
|
||||
<!-- Pause Button -->
|
||||
<object type="button"
|
||||
style="wheatButtonFancy"
|
||||
name="pauseButton"
|
||||
size="50%-60 64 50%+60 96"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" ghost="true" style="centeredText">Pause</object>
|
||||
<action on="Press">togglePause();</action>
|
||||
</object>
|
||||
|
||||
<!-- Exit button -->
|
||||
<object type="button"
|
||||
name="exitButton"
|
||||
style="wheatButtonFancy"
|
||||
size="50%-60 96 50%+60 128"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="centeredText" name="exitButtonText" ghost="true" font="serif-14">Quit</object>
|
||||
<action on="Press">
|
||||
toggleMenu();
|
||||
<![CDATA[messageBox(400, 200, "Do you really want to quit?", "Confirmation", 0, ["Yes", "No!"], [leaveGame, null]);]]>
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Cancel Button -->
|
||||
<object type="button"
|
||||
style="wheatButtonFancy"
|
||||
name="cancelButton"
|
||||
size="50%-60 128 50%+60 160"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" ghost="true" style="centeredText">Cancel</object>
|
||||
<action on="Press">this.parent.parent.hidden=true;</action>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Settings Window -->
|
||||
<!-- ================================ ================================ -->
|
||||
@ -183,10 +261,10 @@
|
||||
hidden="true"
|
||||
z="30"
|
||||
>
|
||||
<object size="50%-100 -16 50%+100 16" name="settingsTitleBar" style="wheatWindowTitleBar" type="text">Settings</object>
|
||||
<object size="0 0 100% 32" type="text" style="largeBoldCenteredText">Settings</object >
|
||||
|
||||
<object name="settingsOptions"
|
||||
size="30 30 100%-30 150"
|
||||
size="30 36 100%-30 180"
|
||||
type="image"
|
||||
style="sessionPanel"
|
||||
>
|
||||
@ -243,34 +321,33 @@
|
||||
size="0 3 500 100%-3"
|
||||
>
|
||||
<!-- Food -->
|
||||
<object size="6 0 96 100%" type="image" sprite="resourceBox" tooltip="Food" tooltip_style="snToolTip">
|
||||
<object size="6 0 96 100%" type="image" style="resourceCounter" tooltip="Food" tooltip_style="snToolTip">
|
||||
<object size="0 -4 28 22" type="image" style="resourceIcon" cell_id="0"/>
|
||||
<object size="40 0 100% 100%-2" type="text" style="resourceText" name="resourceFood"/>
|
||||
<object size="28 0 100% 100%-2" type="text" style="resourceText" name="resourceFood"/>
|
||||
</object>
|
||||
|
||||
<!-- Wood -->
|
||||
<object size="98 0 188 100%" type="image" sprite="resourceBox" tooltip="Wood" tooltip_style="snToolTip">
|
||||
<object size="98 0 188 100%" type="image" style="resourceCounter" tooltip="Wood" tooltip_style="snToolTip">
|
||||
<object size="0 -4 28 22" type="image" style="resourceIcon" cell_id="1"/>
|
||||
<object size="40 0 100% 100%-2" type="text" style="resourceText" name="resourceWood"/>
|
||||
<object size="28 0 100% 100%-2" type="text" style="resourceText" name="resourceWood"/>
|
||||
</object>
|
||||
|
||||
<!-- Stone -->
|
||||
<object size="190 0 280 100%" type="image" sprite="resourceBox" tooltip="Stone" tooltip_style="snToolTip">
|
||||
<object size="190 0 280 100%" type="image" style="resourceCounter" tooltip="Stone" tooltip_style="snToolTip">
|
||||
<object size="0 -4 28 22" type="image" style="resourceIcon" cell_id="2"/>
|
||||
<object size="40 0 100% 100%-2" type="text" style="resourceText" name="resourceStone"/>
|
||||
<object size="28 0 100% 100%-2" type="text" style="resourceText" name="resourceStone"/>
|
||||
</object>
|
||||
|
||||
<!-- Metal -->
|
||||
<object size="282 0 372 100%" type="image" sprite="resourceBox" tooltip="Metal" tooltip_style="snToolTip">
|
||||
<object size="282 0 372 100%" type="image" style="resourceCounter" tooltip="Metal" tooltip_style="snToolTip">
|
||||
<object size="0 -4 28 22" type="image" style="resourceIcon" cell_id="3"/>
|
||||
<object size="40 0 100% 100%-2" type="text" style="resourceText" name="resourceMetal"/>
|
||||
<object size="28 0 100% 100%-2" type="text" style="resourceText" name="resourceMetal"/>
|
||||
</object>
|
||||
|
||||
<!-- Population -->
|
||||
<object size="374 0 464 100%" type="image" sprite="resourceBox" tooltip="Population (current / maximum)" tooltip_style="snToolTip">
|
||||
<object name="populationWarning" type="image" sprite="populationWarning" ghost="true" hidden="false"/>
|
||||
<object size="374 0 464 100%" type="image" style="resourceCounter" tooltip="Population (current / maximum)" tooltip_style="snToolTip">
|
||||
<object size="0 -5 28 21" type="image" style="resourceIcon" cell_id="4"/>
|
||||
<object size="40 0 100% 100%-2" type="text" style="resourceText" name="resourcePop"/>
|
||||
<object size="28 0 100% 100%-2" type="text" style="resourceText" name="resourcePop"/>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@ -282,76 +359,18 @@
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Phase -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object size="67%-100 0%-4 67%+100 26" name="PhaseTitleBar" style="wheatWindowTitleBar" type="text">Village</object>
|
||||
<object size="67%-100 1 67%+100 26" name="PhaseTitleBar" type="text" font="serif-bold-stroke-14" textcolor="white">Phase: Village</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Menu Details -->
|
||||
<!-- Menu Button -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object type="button"
|
||||
name="menuButton"
|
||||
style="wheatButtonFancy"
|
||||
size="100%-114 1 100%+2 27"
|
||||
size="100%-100 0 100% 24"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="largeBoldCenteredText" name="menuButtonText" ghost="true">Menu</object>
|
||||
<object size="0 0 100% 100%" type="text" style="largeBoldCenteredText" name="menuButtonText" ghost="true">MENU</object>
|
||||
<action on="Press">toggleMenu();</action>
|
||||
|
||||
<!-- Menu Panel -->
|
||||
<object name="menuPanel"
|
||||
size="100%-116 0 100% 130"
|
||||
type="image"
|
||||
sprite="menuBackground"
|
||||
hidden="true"
|
||||
z="-10"
|
||||
>
|
||||
<!-- Settings button -->
|
||||
<object type="button"
|
||||
name="settingsButton"
|
||||
style="wheatButtonFancy"
|
||||
size="0 26 114 52"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="centeredText" name="settingsButtonText" ghost="true">Settings</object>
|
||||
<action on="Press">toggleSettingsWindow();</action>
|
||||
</object>
|
||||
|
||||
<!-- Chat button -->
|
||||
<object type="button"
|
||||
name="chatButton"
|
||||
style="wheatButtonFancy"
|
||||
size="0 52 114 78"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="centeredText" name="chatButtonText" ghost="true">Chat</object>
|
||||
<action on="Press">toggleChatWindow();</action>
|
||||
</object>
|
||||
|
||||
<!-- Pause Button -->
|
||||
<object type="button"
|
||||
style="wheatButtonFancy"
|
||||
name="pauseButton"
|
||||
size="0 78 114 104"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" ghost="true" style="centeredText">Pause</object>
|
||||
<action on="Press">togglePause();</action>
|
||||
</object>
|
||||
|
||||
<!-- Exit button -->
|
||||
<object type="button"
|
||||
name="exitButton"
|
||||
style="wheatButtonFancy"
|
||||
size="0 104 114 130"
|
||||
tooltip_style="snToolTip"
|
||||
>
|
||||
<object size="0 0 100% 100%" type="text" style="centeredText" name="exitButtonText" ghost="true" font="serif-14">Quit</object>
|
||||
<action on="Press">
|
||||
toggleMenu();
|
||||
<![CDATA[messageBox(400, 200, "Do you really want to quit?", "Confirmation", 0, ["Yes", "No!"], [leaveGame, null]);]]>
|
||||
</action>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
</object> <!-- END OF MENU -->
|
||||
|
||||
</object> <!-- END OF TOP PANEL -->
|
||||
@ -497,7 +516,6 @@
|
||||
<object name="unitCommandPanel"
|
||||
size="0 100%-35 100% 100%"
|
||||
type="image"
|
||||
sprite="titleBar"
|
||||
z="30"
|
||||
>
|
||||
<object size="0 4 100% 100%-2">
|
||||
|
@ -359,10 +359,6 @@
|
||||
<image backcolor="blue"/>
|
||||
</sprite>
|
||||
|
||||
<sprite name="populationWarning">
|
||||
<image backcolor="255 255 0 128"/>
|
||||
</sprite>
|
||||
|
||||
<sprite name="bandbox">
|
||||
<image backcolor="black" size="0 0 100% 1"/>
|
||||
<image backcolor="black" size="100%-1 0 100% 100%"/>
|
||||
@ -374,12 +370,25 @@
|
||||
<image backcolor="white" size="1 1 2 100%-1"/>
|
||||
</sprite>
|
||||
|
||||
<sprite name="primaryGroupHighlight">
|
||||
<image backcolor="0 255 0 85"/>
|
||||
<sprite name="chatInput">
|
||||
<image backcolor="255 255 255 192" size="0 0 100% 1"/>
|
||||
<image backcolor="255 255 255 192" size="100%-1 1 100% 100%-1"/>
|
||||
<image backcolor="255 255 255 192" size="0 100%-1 100% 100%"/>
|
||||
<image backcolor="255 255 255 192" size="0 1 1 100%-1"/>
|
||||
|
||||
<image backcolor="255 255 255 128" size="0 1 100% 2"/>
|
||||
<image backcolor="255 255 255 128" size="100%-2 2 100%-1 100%-2"/>
|
||||
<image backcolor="255 255 255 128" size="0 100%-2 100% 100%-1"/>
|
||||
<image backcolor="255 255 255 128" size="1 2 2 100%-2"/>
|
||||
|
||||
<image backcolor="255 255 255 64" size="0 2 100% 3"/>
|
||||
<image backcolor="255 255 255 64" size="100%-3 3 100%-2 100%-3"/>
|
||||
<image backcolor="255 255 255 64" size="0 100%-3 100% 100%-2"/>
|
||||
<image backcolor="255 255 255 64" size="2 3 3 100%-3"/>
|
||||
</sprite>
|
||||
|
||||
<sprite name="menuBackground">
|
||||
<image backcolor="0 0 0 85"/>
|
||||
<sprite name="chatInputHighlight">
|
||||
<image backcolor="255 165 0 192" size="-2 1 100% 100%+1"/>
|
||||
</sprite>
|
||||
|
||||
<sprite name="devCommandsBackground">
|
||||
|
@ -63,12 +63,11 @@
|
||||
textcolor="white"
|
||||
font="serif-bold-14"
|
||||
ghost="true"
|
||||
text_align="right"
|
||||
text_align="left"
|
||||
text_valign="center"
|
||||
/>
|
||||
|
||||
<style name="resourceCounter"
|
||||
sprite="resourceBox"
|
||||
tooltip_style="snToolTip"
|
||||
/>
|
||||
|
||||
@ -157,7 +156,7 @@
|
||||
|
||||
<style name="largeBoldCenteredText"
|
||||
font="serif-bold-18"
|
||||
textcolor="black"
|
||||
textcolor="white"
|
||||
text_align="center"
|
||||
text_valign="center"
|
||||
/>
|
||||
@ -179,6 +178,13 @@
|
||||
text_valign="top"
|
||||
/>
|
||||
|
||||
<style name="chatInput"
|
||||
sprite="chatInput"
|
||||
sprite_selectarea="chatInputHighlight"
|
||||
textcolor="white"
|
||||
textcolor_selected="darkgray"
|
||||
/>
|
||||
|
||||
<style name="notificationPanel"
|
||||
buffer_zone="5"
|
||||
font="serif-bold-stroke-14"
|
||||
|
@ -329,14 +329,17 @@ function updateUnitCommands(entState, supplementalDetailsPanel, commandsPanel, s
|
||||
|
||||
var commands = getEntityCommandsList(entState);
|
||||
if (commands.length)
|
||||
|
||||
setupUnitPanel("Command", usedPanels, entState, commands,
|
||||
function (item) { performCommand(entState.id, item); } );
|
||||
|
||||
getGUIObjectByName("player").hidden = true;
|
||||
supplementalDetailsPanel.hidden = false;
|
||||
commandsPanel.hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
getGUIObjectByName("player").hidden = false;
|
||||
getGUIObjectByName("stamina").hidden = true;
|
||||
supplementalDetailsPanel.hidden = true;
|
||||
commandsPanel.hidden = true;
|
||||
|
@ -123,31 +123,31 @@ function getFormationCellId(formationName)
|
||||
{
|
||||
switch (formationName)
|
||||
{
|
||||
case "Fromation0":
|
||||
case "Formation0":
|
||||
return 0;
|
||||
case "Fromation1":
|
||||
case "Formation1":
|
||||
return 1;
|
||||
case "Fromation2":
|
||||
case "Formation2":
|
||||
return 2;
|
||||
case "Fromation3":
|
||||
case "Formation3":
|
||||
return 3;
|
||||
case "Fromation4":
|
||||
case "Formation4":
|
||||
return 4;
|
||||
case "Fromation5":
|
||||
case "Formation5":
|
||||
return 5;
|
||||
case "Fromation6":
|
||||
case "Formation6":
|
||||
return 6;
|
||||
case "Fromation7":
|
||||
case "Formation7":
|
||||
return 7;
|
||||
case "Fromation8":
|
||||
case "Formation8":
|
||||
return 8;
|
||||
case "Fromation9":
|
||||
case "Formation9":
|
||||
return 9;
|
||||
case "Fromation10":
|
||||
case "Formation10":
|
||||
return 10;
|
||||
case "Fromation11":
|
||||
case "Formation11":
|
||||
return 11;
|
||||
case "Fromation12":
|
||||
case "Formation12":
|
||||
return 12;
|
||||
default:
|
||||
return -1;
|
||||
@ -169,19 +169,19 @@ function getEntityFormationsList(entState)
|
||||
{
|
||||
var formations = [];
|
||||
|
||||
formations.push("Fromation0");
|
||||
formations.push("Fromation1");
|
||||
formations.push("Fromation2");
|
||||
formations.push("Fromation3");
|
||||
formations.push("Fromation4");
|
||||
formations.push("Fromation5");
|
||||
formations.push("Fromation6");
|
||||
formations.push("Fromation7");
|
||||
formations.push("Fromation8");
|
||||
formations.push("Fromation9");
|
||||
formations.push("Fromation10");
|
||||
formations.push("Fromation11");
|
||||
formations.push("Fromation12");
|
||||
formations.push("Formation0");
|
||||
formations.push("Formation1");
|
||||
formations.push("Formation2");
|
||||
formations.push("Formation3");
|
||||
formations.push("Formation4");
|
||||
formations.push("Formation5");
|
||||
formations.push("Formation6");
|
||||
formations.push("Formation7");
|
||||
formations.push("Formation8");
|
||||
formations.push("Formation9");
|
||||
formations.push("Formation10");
|
||||
formations.push("Formation11");
|
||||
formations.push("Formation12");
|
||||
return formations;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user