mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 11:04:07 +00:00
Session cleanup.
Move chat window and developer overlay to a custom file. Use String(foo) instead of ""+foo. Remove a pointless loop and GetGUIObjectByName call in autoCompleteNick. Remove noisy line-comments. This was SVN commit r18399.
This commit is contained in:
@@ -179,22 +179,18 @@ function tryAutoComplete(text, autoCompleteList)
|
||||
return text;
|
||||
}
|
||||
|
||||
function autoCompleteNick(guiName, playerList)
|
||||
function autoCompleteNick(guiObject, playernames)
|
||||
{
|
||||
var input = Engine.GetGUIObjectByName(guiName);
|
||||
var text = input.caption;
|
||||
let text = guiObject.caption;
|
||||
if (!text.length)
|
||||
return;
|
||||
|
||||
var autoCompleteList = [];
|
||||
for (var player of playerList)
|
||||
autoCompleteList.push(player.name);
|
||||
let bufferPosition = guiObject.buffer_position;
|
||||
let textTillBufferPosition = text.substring(0, bufferPosition);
|
||||
let newText = tryAutoComplete(textTillBufferPosition, playernames);
|
||||
|
||||
var bufferPosition = input.buffer_position;
|
||||
var textTillBufferPosition = text.substring(0, bufferPosition);
|
||||
var newText = tryAutoComplete(textTillBufferPosition, autoCompleteList);
|
||||
input.caption = newText + text.substring(bufferPosition);
|
||||
input.buffer_position = bufferPosition + (newText.length - textTillBufferPosition.length);
|
||||
guiObject.caption = newText + text.substring(bufferPosition);
|
||||
guiObject.buffer_position = bufferPosition + (newText.length - textTillBufferPosition.length);
|
||||
}
|
||||
|
||||
function clearChatMessages()
|
||||
|
||||
@@ -200,10 +200,10 @@
|
||||
<object name="chatInput" size="4 100%-24 100%-76 100%-4" type="input" style="ModernInput">
|
||||
<action on="Press">submitChatInput();</action>
|
||||
<action on="Tab">
|
||||
var players = [];
|
||||
for (var player in g_PlayerAssignments)
|
||||
let players = [];
|
||||
for (let player in g_PlayerAssignments)
|
||||
players.push(g_PlayerAssignments[player]);
|
||||
autoCompleteNick("chatInput", players);
|
||||
autoCompleteNick(this, players);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
|
||||
@@ -234,7 +234,9 @@
|
||||
<object name="chatText" size="0 0 100% 94%" type="text" style="ChatPanel" font="sans-13"/>
|
||||
<object name="chatInput" size="0 94% 100% 100%" type="input" style="ModernInput" font="sans-13">
|
||||
<action on="Press">submitChatInput();</action>
|
||||
<action on="Tab">autoCompleteNick("chatInput", Engine.GetPlayerList());</action>
|
||||
<action on="Tab">
|
||||
autoCompleteNick(this, Engine.GetPlayerList().map(player => player.name));
|
||||
</action>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
|
||||
<object name="playersFilter" type="input" style="ModernInput" size="12%-5 0 56%-10 100%" font="sans-bold-13">
|
||||
<action on="Press">displayReplayList();</action>
|
||||
<action on="Tab">autoCompleteNick("playersFilter", g_Playernames.map(name => ({ "name": name })));</action>
|
||||
<action on="Tab">
|
||||
autoCompleteNick(this, g_Playernames);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<object name="mapNameFilter" type="dropdown" style="ModernDropDown" size="56%-5 0 70%-10 100%" font="sans-bold-13">
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<object name="chatDialogPanel" size="50%-180 50%-66 50%+180 50%+54" type="image" hidden="true" sprite="genericPanel">
|
||||
|
||||
<!-- Message addressee -->
|
||||
<object size="16 14 50 38" type="text" style="chatPanel">
|
||||
<translatableAttribute id="caption" context="chat input">To:</translatableAttribute>
|
||||
</object>
|
||||
<object size="75 12 100%-16 36" name="chatAddressee" type="dropdown" style="ModernDropDown" tooltip_style="sessionToolTipBold">
|
||||
<translatableAttribute id="tooltip" context="chat input">Select chatmessage addressee</translatableAttribute>
|
||||
</object>
|
||||
|
||||
<!-- Message text -->
|
||||
<object size="16 46 50 70" type="text" style="chatPanel">
|
||||
<translatableAttribute id="caption" context="chat input">Text:</translatableAttribute>
|
||||
</object>
|
||||
<object name="chatInput" size="75 44 100%-16 68" type="input" style="ModernInput" max_length="80">
|
||||
<translatableAttribute id="tooltip" context="chat input">Type the message to send.</translatableAttribute>
|
||||
<action on="Press">submitChatInput();</action>
|
||||
<action on="Tab">
|
||||
let playernames = [];
|
||||
for (let player in g_PlayerAssignments)
|
||||
playernames.push(g_PlayerAssignments[player].name);
|
||||
autoCompleteNick(this, playernames);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Cancel Button -->
|
||||
<object size="16 100%-40 30%+16 100%-12" type="button" style="StoneButton">
|
||||
<translatableAttribute id="caption">Cancel</translatableAttribute>
|
||||
<action on="Press">closeChat();</action>
|
||||
</object>
|
||||
|
||||
<!-- Send Button -->
|
||||
<object size="60%+16 100%-40 100%-16 100%-12" type="button" style="StoneButton">
|
||||
<translatableAttribute id="caption">Send</translatableAttribute>
|
||||
<action on="Press">submitChatInput();</action>
|
||||
</object>
|
||||
|
||||
</object>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<object
|
||||
name="devCommands"
|
||||
type="image"
|
||||
sprite="devCommandsBackground"
|
||||
size="100%-225 50%-88 100%-8 50%+120"
|
||||
z="40"
|
||||
hidden="true"
|
||||
hotkey="session.devcommands.toggle"
|
||||
>
|
||||
<action on="Press">
|
||||
toggleDeveloperOverlay();
|
||||
</action>
|
||||
|
||||
<!-- Control all units -->
|
||||
<object size="0 0 100%-18 16" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Control all units</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 0 100% 16" type="checkbox" name="devControlAll" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.PostNetworkCommand({
|
||||
"type": "control-all",
|
||||
"flag": this.checked
|
||||
});
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Change perspective -->
|
||||
<object size="0 16 100%-18 32" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Change perspective</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 16 100% 32" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
toggleChangePerspective(this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Display selection state -->
|
||||
<object size="0 32 100%-18 48" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Display selection state</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 32 100% 48" type="checkbox" name="devDisplayState" style="ModernTickBox"/>
|
||||
|
||||
<!-- Pathfinder overlay -->
|
||||
<object size="0 48 100%-18 64" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Pathfinder overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 48 100% 64" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.GuiInterfaceCall("SetPathfinderDebugOverlay", this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Obstruction overlay -->
|
||||
<object size="0 64 100%-18 80" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Obstruction overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 64 100% 80" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.GuiInterfaceCall("SetObstructionDebugOverlay", this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Unit motion overlay -->
|
||||
<object size="0 80 100%-18 96" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Unit motion overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 80 100% 96" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
g_Selection.SetMotionDebugOverlay(this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Range overlay -->
|
||||
<object size="0 96 100%-18 112" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Range overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 96 100% 112" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.GuiInterfaceCall("SetRangeDebugOverlay", this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Bounding box overlay -->
|
||||
<object size="0 112 100%-18 128" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Bounding box overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 112 100% 128" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.SetBoundingBoxDebugOverlay(this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Unrestricted camera -->
|
||||
<object size="0 128 100%-18 144" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Restrict camera</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 128 100% 144" type="checkbox" style="ModernTickBox" checked="true">
|
||||
<action on="Press">
|
||||
Engine.GameView_SetConstrainCameraEnabled(this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Reveal map -->
|
||||
<object size="0 144 100%-18 160" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Reveal map</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 144 100% 160" type="checkbox" name="devCommandsRevealMap" style="ModernTickBox">
|
||||
<action on="Load">
|
||||
this.checked = Engine.GuiInterfaceCall("IsMapRevealed");
|
||||
</action>
|
||||
<action on="Press">
|
||||
Engine.PostNetworkCommand({
|
||||
"type": "reveal-map",
|
||||
"enable": this.checked
|
||||
});
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Time warp mode -->
|
||||
<object size="0 160 100%-18 176" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Enable time warp</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 160 100% 176" type="checkbox" name="devTimeWarp" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
if (this.checked)
|
||||
showTimeWarpMessageBox();
|
||||
Engine.EnableTimeWarpRecording(this.checked ? 10 : 0);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Promote units -->
|
||||
<object size="0 176 100%-18 192" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Promote selected units</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 176 100% 192" type="button" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.PostNetworkCommand({
|
||||
"type": "promote",
|
||||
"entities": g_Selection.toList()
|
||||
});
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Hierarchical pathfinder overlay -->
|
||||
<object size="0 192 100%-18 208" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Hierarchical pathfinder overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 192 100% 208" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.GuiInterfaceCall("SetPathfinderHierDebugOverlay", this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
</object>
|
||||
@@ -948,7 +948,7 @@ function updateGroups()
|
||||
|
||||
function updateDebug()
|
||||
{
|
||||
let debug = Engine.GetGUIObjectByName("debug");
|
||||
let debug = Engine.GetGUIObjectByName("debugEntityState");
|
||||
|
||||
if (!Engine.GetGUIObjectByName("devDisplayState").checked)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<script file="gui/common/settings.js"/>
|
||||
<script file="gui/common/timer.js"/>
|
||||
<script file="gui/common/tooltips.js"/>
|
||||
<!-- load all scripts in this directory -->
|
||||
|
||||
<script directory="gui/session/"/>
|
||||
|
||||
<object name="sn" hotkey="session.gui.toggle">
|
||||
@@ -33,147 +33,24 @@
|
||||
this.hidden = !this.hidden;
|
||||
</action>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- HOTKEYS (For some reason, they won't work properly unless outside menu) -->
|
||||
<!-- ================================ ================================ -->
|
||||
|
||||
<!-- hotkeys are in a separate directory -->
|
||||
<!-- Hotkeys won't work properly unless outside menu) -->
|
||||
<include directory="gui/session/hotkeys/"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Developer / Debug items -->
|
||||
<!-- ================================ ================================ -->
|
||||
|
||||
<!-- Debug text -->
|
||||
<object name="debug"
|
||||
type="text"
|
||||
size="0 70 80% 100%"
|
||||
ghost="true"
|
||||
textcolor="yellow"
|
||||
font="mono-stroke-10"
|
||||
/>
|
||||
|
||||
<!-- Dev/cheat commands -->
|
||||
<object name="devCommands" size="100%-225 50%-88 100%-8 50%+120" type="image" sprite="devCommandsBackground" z="40"
|
||||
hidden="true" hotkey="session.devcommands.toggle">
|
||||
<action on="Press">toggleDeveloperOverlay();</action>
|
||||
|
||||
<object size="0 0 100%-18 16" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Control all units</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 0 100% 16" type="checkbox" name="devControlAll" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
Engine.PostNetworkCommand({ "type": "control-all", "flag": this.checked });
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<object size="0 16 100%-18 32" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Change perspective</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 16 100% 32" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">toggleChangePerspective(this.checked);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 32 100%-18 48" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Display selection state</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 32 100% 48" type="checkbox" name="devDisplayState" style="ModernTickBox"/>
|
||||
|
||||
<object size="0 48 100%-18 64" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Pathfinder overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 48 100% 64" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">Engine.GuiInterfaceCall("SetPathfinderDebugOverlay", this.checked);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 64 100%-18 80" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Obstruction overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 64 100% 80" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">Engine.GuiInterfaceCall("SetObstructionDebugOverlay", this.checked);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 80 100%-18 96" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Unit motion overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 80 100% 96" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">g_Selection.SetMotionDebugOverlay(this.checked);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 96 100%-18 112" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Range overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 96 100% 112" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">Engine.GuiInterfaceCall("SetRangeDebugOverlay", this.checked);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 112 100%-18 128" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Bounding box overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 112 100% 128" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">Engine.SetBoundingBoxDebugOverlay(this.checked);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 128 100%-18 144" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Restrict camera</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 128 100% 144" type="checkbox" style="ModernTickBox" checked="true">
|
||||
<action on="Press">
|
||||
Engine.GameView_SetConstrainCameraEnabled(this.checked);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<object size="0 144 100%-18 160" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Reveal map</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 144 100% 160" type="checkbox" name="devCommandsRevealMap" style="ModernTickBox">
|
||||
<action on="Load">this.checked = Engine.GuiInterfaceCall("IsMapRevealed");</action>
|
||||
<action on="Press">Engine.PostNetworkCommand({"type": "reveal-map", "enable": this.checked});</action>
|
||||
</object>
|
||||
|
||||
<object size="0 160 100%-18 176" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Enable time warp</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 160 100% 176" type="checkbox" name="devTimeWarp" style="ModernTickBox">
|
||||
<action on="Press">
|
||||
if (this.checked)
|
||||
showTimeWarpMessageBox();
|
||||
Engine.EnableTimeWarpRecording(this.checked ? 10 : 0);</action>
|
||||
</object>
|
||||
|
||||
<object size="0 176 100%-18 192" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Promote selected units</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 176 100% 192" type="button" style="ModernTickBox">
|
||||
<action on="Press">Engine.PostNetworkCommand({"type": "promote", "entities": g_Selection.toList()});</action>
|
||||
</object>
|
||||
|
||||
<object size="0 192 100%-18 208" type="text" style="devCommandsText">
|
||||
<translatableAttribute id="caption">Hierarchical pathfinder overlay</translatableAttribute>
|
||||
</object>
|
||||
<object size="100%-16 192 100% 208" type="checkbox" style="ModernTickBox">
|
||||
<action on="Press">Engine.GuiInterfaceCall("SetPathfinderHierDebugOverlay", this.checked);</action>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Time elapsed counter -->
|
||||
<!-- ================================ ================================ -->
|
||||
|
||||
<object size="100%-250 45 100%-140 65" type="text" name="timeElapsedCounter" style="SettingsText" hotkey="timeelapsedcounter.toggle" hidden="true">
|
||||
<action on="Press">
|
||||
Engine.ConfigDB_CreateValue("user", "gui.session.timeelapsedcounter", ""+(Engine.ConfigDB_GetValue("user", "gui.session.timeelapsedcounter") !== "true"));
|
||||
</action>
|
||||
</object>
|
||||
<object size="100%-250 80 100%-140 100" type="text" name="ceasefireCounter" style="SettingsText" hotkey="ceasefirecounter.toggle" hidden="true">
|
||||
<action on="Press">
|
||||
Engine.ConfigDB_CreateValue("user", "gui.session.ceasefirecounter", ""+(Engine.ConfigDB_GetValue("user", "gui.session.ceasefirecounter") !== "true"));
|
||||
Engine.ConfigDB_CreateValue("user", "gui.session.timeelapsedcounter", String(Engine.ConfigDB_GetValue("user", "gui.session.timeelapsedcounter") !== "true"));
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Ceasefire counter -->
|
||||
<object size="100%-250 80 100%-140 100" type="text" name="ceasefireCounter" style="SettingsText" hotkey="ceasefirecounter.toggle" hidden="true">
|
||||
<action on="Press">
|
||||
Engine.ConfigDB_CreateValue("user", "gui.session.ceasefirecounter", String(Engine.ConfigDB_GetValue("user", "gui.session.ceasefirecounter") !== "true"));
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Pause Overlay -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object type="button" name="pauseOverlay" size="0 0 100% 100%" tooltip_style="sessionToolTip" hidden="true" z="0">
|
||||
<object size="0 0 100% 100%" type="image" sprite="devCommandsBackground" ghost="true" z="0"/>
|
||||
<object size="50%-128 40%-20 50%+128 40%+20" type="text" style="PauseText" ghost="true" z="0">
|
||||
@@ -186,120 +63,51 @@
|
||||
<action on="Press">togglePause();</action>
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Notification Area -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="notificationPanel" type="image" size="50%-300 60 50%+300 120" ghost="true">
|
||||
<object name="notificationText" size="0 0 100% 100%" type="text" style="notificationPanel" ghost="true"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Chat -->
|
||||
<!-- ================================ ================================ -->
|
||||
|
||||
<!-- Chat panel -->
|
||||
<!-- Chat messages -->
|
||||
<object name="chatPanel" size="0 130 100% 100%-240" type="image" ghost="true" z="0" absolute="true">
|
||||
<object name="chatText" size="3 1 100%-1 100%-1" type="text" style="chatPanel" ghost="true"/>
|
||||
</object>
|
||||
|
||||
<!-- Chat window -->
|
||||
<object name="chatDialogPanel" size="50%-180 50%-66 50%+180 50%+54" type="image" hidden="true" sprite="genericPanel">
|
||||
<!-- Entity selection state text -->
|
||||
<object name="debugEntityState"
|
||||
type="text"
|
||||
size="0 70 80% 100%"
|
||||
ghost="true"
|
||||
textcolor="yellow"
|
||||
font="mono-stroke-10"
|
||||
/>
|
||||
|
||||
<!-- Message addressee -->
|
||||
<object size="16 14 50 38" type="text" style="chatPanel">
|
||||
<translatableAttribute id="caption" context="chat input">To:</translatableAttribute>
|
||||
</object>
|
||||
<object size="75 12 100%-16 36" name="chatAddressee" type="dropdown" style="ModernDropDown" tooltip_style="sessionToolTipBold">
|
||||
<translatableAttribute id="tooltip" context="chat input">Select chatmessage addressee</translatableAttribute>
|
||||
</object>
|
||||
|
||||
<!-- Message text -->
|
||||
<object size="16 46 50 70" type="text" style="chatPanel">
|
||||
<translatableAttribute id="caption" context="chat input">Text:</translatableAttribute>
|
||||
</object>
|
||||
<object name="chatInput" size="75 44 100%-16 68" type="input" style="ModernInput" max_length="80">
|
||||
<translatableAttribute id="tooltip" context="chat input">Type the message to send.</translatableAttribute>
|
||||
<action on="Press">submitChatInput();</action>
|
||||
<action on="Tab">
|
||||
var players = [];
|
||||
for (var player in g_PlayerAssignments)
|
||||
players.push(g_PlayerAssignments[player]);
|
||||
autoCompleteNick("chatInput", players);
|
||||
</action>
|
||||
</object>
|
||||
|
||||
<!-- Cancel -->
|
||||
<object size="16 100%-40 30%+16 100%-12" type="button" style="StoneButton">
|
||||
<translatableAttribute id="caption">Cancel</translatableAttribute>
|
||||
<action on="Press">closeChat();</action>
|
||||
</object>
|
||||
|
||||
<!-- Send -->
|
||||
<object size="60%+16 100%-40 100%-16 100%-12" type="button" style="StoneButton">
|
||||
<translatableAttribute id="caption">Send</translatableAttribute>
|
||||
<action on="Press">submitChatInput();</action>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Custom dialogs -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include directory="gui/session/dialogs/"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Diplomacy Window -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include file="gui/session/chat_window.xml"/>
|
||||
<include file="gui/session/developer_overlay.xml"/>
|
||||
<include file="gui/session/diplomacy_window.xml"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Trade Window -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include file="gui/session/trade_window.xml"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Top Panel -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include file="gui/session/top_panel.xml"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Menu -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include file="gui/session/menu.xml"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Session objects -->
|
||||
<!-- Contains miscellanious objects s.a.: the technology research -->
|
||||
<!-- progress, group selection icons, and the hero selection icon -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include directory="gui/session/session_objects/"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Information tooltip -->
|
||||
<!-- Follows the mouse around if 'independent' is set to 'true'. -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="informationTooltip" type="tooltip" independent="true" style="informationTooltip"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Building placement info tooltip -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="placementTooltip" type="tooltip" independent="true" style="informationTooltip"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- START of BOTTOM PANEL -->
|
||||
<!-- limit to the minimal supported width of 1024px -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object size="50%-512 0 50%+512 100%">
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Minimap -->
|
||||
<!-- ================================ ================================ -->
|
||||
<include file="gui/session/minimap_panel.xml"/>
|
||||
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Supplemental Details Panel (Left of Selection Details) -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object
|
||||
size="50%-304 100%-170 50%-110 100%"
|
||||
name="supplementalSelectionDetails"
|
||||
@@ -310,10 +118,7 @@
|
||||
<include directory="gui/session/selection_panels_left/"/>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Selection Details Panel (Middle) -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="selectionDetails"
|
||||
type="image"
|
||||
sprite="selectionDetailsPanel"
|
||||
@@ -323,9 +128,7 @@
|
||||
<include directory="gui/session/selection_panels_middle/"/>
|
||||
</object>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Commands Panel (Right of Selection Details) -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="unitCommands"
|
||||
type="image"
|
||||
sprite="unitCommandsPanel"
|
||||
@@ -336,16 +139,12 @@
|
||||
<include directory="gui/session/selection_panels_right/"/>
|
||||
</object>
|
||||
</object><!-- END OF BOTTOM PANEL -->
|
||||
</object> <!-- END OF SN OBJECT -->
|
||||
</object> <!-- END OF SESSION OBJECT -->
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Selection bandbox -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="bandbox" type="image" sprite="bandbox" ghost="true" hidden="true" z="200"/>
|
||||
|
||||
<!-- ================================ ================================ -->
|
||||
<!-- Network status -->
|
||||
<!-- ================================ ================================ -->
|
||||
<object name="netStatus" type="text" style="netStatus" z="200" hidden="true">
|
||||
<object type="button"
|
||||
name="disconnectedExitButton"
|
||||
@@ -356,7 +155,7 @@
|
||||
<object size="0 0 100% 100%" type="text" style="CenteredButtonText" name="disconnectedExitButtonText" ghost="true">
|
||||
<translatableAttribute id="caption">Exit</translatableAttribute>
|
||||
</object>
|
||||
<action on="Press">leaveGame()</action>
|
||||
<action on="Press">leaveGame();</action>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user