removed session dialog, updated ingame menu

This was SVN commit r10114.
This commit is contained in:
WhiteTreePaladin
2011-08-27 22:44:08 +00:00
parent e33124631b
commit e933986351
4 changed files with 241 additions and 268 deletions
@@ -186,12 +186,12 @@ Status: $status.
tooltip="The 0 A.D. Game Manual"
>
Learn To Play
<action on="Press"><![CDATA[
// close submenu if left open
<action on="Press">
getGUIObjectByName("submenu").hidden = true;
// open game manual dialog
Engine.PushGuiPage("page_manual.xml", { "page": "intro" });
]]></action>
<![CDATA[
Engine.PushGuiPage("page_manual.xml", { "page": "intro" });
]]>
</action>
</object>
<!-- SINGLEPLAYER BUTTON -->
@@ -202,10 +202,12 @@ Status: $status.
tooltip_style="pgToolTip"
tooltip="Challenge the computer player to a single player match."
>
Single Player
<action on="Press"><![CDATA[
updateSubmenu("submenuSinglePlayer", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 2);
]]></action>
Single Player
<action on="Press">
<![CDATA[
updateSubmenu("submenuSinglePlayer", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 2);
]]>
</action>
</object>
<!-- MULTIPLAYER BUTTON -->
@@ -217,9 +219,11 @@ Status: $status.
tooltip="Fight against one or more human players in a multiplayer game."
>
Multiplayer
<action on="Press"><![CDATA[
updateSubmenu("submenuMultiplayer", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 2);
]]></action>
<action on="Press">
<![CDATA[
updateSubmenu("submenuMultiplayer", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 2);
]]>
</action>
</object>
<!-- TOOLS AND OPTIONS BUTTON -->
@@ -231,9 +235,11 @@ Status: $status.
tooltip="Game options and scenario design tools."
>
Tools <![CDATA[&]]> Options
<action on="Press"><![CDATA[
updateSubmenu("submenuToolsAndOptions", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 2);
]]></action>
<action on="Press">
<![CDATA[
updateSubmenu("submenuToolsAndOptions", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 2);
]]>
</action>
</object>
<!-- HISTORY BUTTON -->
@@ -245,12 +251,12 @@ Status: $status.
tooltip="Learn about the six civilizations featured in 0 A.D."
>
History
<action on="Press"><![CDATA[
// close submenu if left open
<action on="Press">
getGUIObjectByName("submenu").hidden = true;
// open history dialog
Engine.PushGuiPage("page_civinfo.xml");
]]></action>
<![CDATA[
Engine.PushGuiPage("page_civinfo.xml");
]]>
</action>
</object>
<!-- EXIT BUTTON -->
@@ -261,15 +267,15 @@ Status: $status.
tooltip_style="pgToolTip"
tooltip="Exit Game"
>
Exit
<action on="Press"><![CDATA[
// close submenu if left open
Exit Game
<action on="Press">
getGUIObjectByName("submenu").hidden = true;
// open exit dialog
var btCaptions = ["Yes", "No"];
var btCode = [exit, null];
messageBox(400, 200, "Are you sure you want to quit 0 A.D.?", "Confirmation", 0, btCaptions, btCode);
]]></action>
<![CDATA[
var btCaptions = ["Yes", "No"];
var btCode = [exit, null];
messageBox(400, 200, "Are you sure you want to quit 0 A.D.?", "Confirmation", 0, btCaptions, btCode);
]]>
</action>
</object>
</object>
+33 -24
View File
@@ -1,39 +1,46 @@
function toggleDeveloperOverlay()
function openMenu()
{
var devCommands = getGUIObjectByName("devCommands");
var text = devCommands.hidden? "opened." : "closed.";
submitChatDirectly("The Developer Overlay was " + text);
devCommands.hidden = !devCommands.hidden;
getGUIObjectByName("menuScreen").hidden = false;
getGUIObjectByName("menu").hidden = false;
}
function openMenuDialog()
function closeMenu()
{
var menu = getGUIObjectByName("menuDialogPanel");
g_SessionDialog.open("Menu", null, menu, 204, 224, null);
getGUIObjectByName("menuScreen").hidden = true;
getGUIObjectByName("menu").hidden = true;
}
function openSettingsDialog()
function openSettings()
{
var settings = getGUIObjectByName("settingsDialogPanel");
g_SessionDialog.open("Settings", null, settings, 340, 252, null);
closeMenu();
closeChat();
getGUIObjectByName("settingsDialogPanel").hidden = false;
}
function closeSettings()
{
getGUIObjectByName("settingsDialogPanel").hidden = true;
}
function openChat()
{
closeMenu();
closeSettings();
getGUIObjectByName("chatInput").focus(); // Grant focus to the input area
getGUIObjectByName("chatDialogPanel").hidden = false;
g_SessionDialog.close();
}
function closeChat()
{
getGUIObjectByName("chatInput").caption = ""; // Clear chat input
getGUIObjectByName("chatDialogPanel").hidden = true;
g_SessionDialog.close();
}
function toggleChatWindow()
{
closeSettings();
var chatWindow = getGUIObjectByName("chatDialogPanel");
var chatInput = getGUIObjectByName("chatInput");
@@ -43,11 +50,14 @@ function toggleChatWindow()
chatInput.caption = ""; // Clear chat input
chatWindow.hidden = !chatWindow.hidden;
g_SessionDialog.close();
}
function togglePause()
{
closeMenu();
closeChat();
closeSettings();
var pauseOverlay = getGUIObjectByName("pauseOverlay");
if (pauseOverlay.hidden)
@@ -62,20 +72,19 @@ function togglePause()
}
pauseOverlay.hidden = !pauseOverlay.hidden;
g_SessionDialog.close();
}
function openExitGameDialog()
function toggleDeveloperOverlay()
{
g_SessionDialog.open("Exit Game", "Do you really want to quit?", null, 320, 140, leaveGame);
var devCommands = getGUIObjectByName("devCommands");
var text = devCommands.hidden? "opened." : "closed.";
submitChatDirectly("The Developer Overlay was " + text);
devCommands.hidden = !devCommands.hidden;
}
function escapeKeyAction()
{
var sessionDialog = getGUIObjectByName("sessionDialog");
if (!sessionDialog.hidden)
g_SessionDialog.close();
else
getGUIObjectByName("chatDialogPanel").hidden = true;
}
closeMenu();
closeChat();
closeSettings();
}
+173 -150
View File
@@ -29,20 +29,6 @@
this.hidden = !this.hidden;
</action>
<!-- ================================ ================================ -->
<!-- ALPHA LABELS (alpha, build time, revision) -->
<!-- ================================ ================================ -->
<!-- Displays Alpha name and number -->
<object size="100%-200 32 100% 52" name="alphaLabel" type="text" style="centeredText" font="serif-bold-16" textcolor="white" ghost="true">
ALPHA VI : Fortuna
</object>
<!-- Displays build date and revision number-->
<object size="100%-200 52 100% 72" name="buildTimeLabel" type="text" style="centeredText" font="serif-12" textcolor="white" ghost="true">
<action on="Load"><![CDATA[this.caption = buildTime(0) + " (" + buildTime(2) + ")";]]></action>
</object>
<!-- ================================ ================================ -->
<!-- HOTKEYS (For some reason, they won't work properly unless outside menu) -->
<!-- ================================ ================================ -->
@@ -103,7 +89,7 @@
/>
<!-- Dev/cheat commands -->
<object name="devCommands" size="100%-156 72 100%-16 232" type="image" sprite="devCommandsBackground"
<object name="devCommands" size="100%-156 100 100%-8 260" type="image" sprite="devCommandsBackground"
hidden="true" hotkey="session.devcommands.toggle">
<action on="Press">
toggleDeveloperOverlay();
@@ -208,135 +194,155 @@
</object>
</object>
<!-- ================================ ================================ -->
<!-- Session Dialog -->
<!-- ================================ ================================ -->
<object name="sessionDialog"
style="StonePanelLight"
type="image"
size="50%-180 50%-200 50%+180 50%+50"
hidden="true"
z="30"
>
<object name="sessionDialogTitleBar" size="50%-96 -16 50%+96 16" type="image" style="StoneDialogTitleBar">
<object name="sessionDialogTitle" type="text" style="TitleText" size="0 -2 100% 100%">Title</object>
</object>
<object name="sessionDialogMessage" size="20 10 100%-20 100%-48" type="text" style="dialogText"/>
<object size="0 100%-48 100% 100%">
<object name="sessionDialogConfirm" size="32 100%-64 144 100%-32" type="button" style="StoneButton">
OK
<action on="Press"></action>
</object>
<object name="sessionDialogCancel" size="100%-144 100%-64 100%-32 100%-32" type="button" style="StoneButton">
Cancel
<action on="Press">g_SessionDialog.close();</action>
</object>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Menu -->
<!-- ================================ ================================ -->
<object name="menuDialogPanel"
size="0 50%-180 100% 50%+20"
<object name="menuScreen"
type="image"
hidden="true"
z="30"
>
<!-- Settings button -->
<object type="button"
name="settingsButton"
style="StoneButtonFancy"
size="0 0 100% 32"
tooltip_style="sessionToolTip"
>
Settings
<action on="Press">openSettingsDialog();</action>
</object>
hidden="true"
>
<!-- hides the submenu when the mouse leaves the mainMenuButtons or submenu -->
<action on="MouseEnter">
closeMenu();
</action>
<object name="menu"
style="TranslucentPanelThinBorder"
type="image"
size="100%-164 0 100% 200"
hidden="true"
>
<object size="4 36 100%-4 50%+20">
<!-- Settings button -->
<object type="button"
name="settingsButton"
style="StoneButtonFancy"
size="0 0 100% 32"
tooltip_style="sessionToolTip"
>
Settings
<action on="Press">
openSettings();
</action>
</object>
<!-- Chat button -->
<object type="button"
name="chatButton"
style="StoneButtonFancy"
size="0 32 100% 64"
tooltip_style="sessionToolTip"
>
Chat
<action on="Press">openChat();</action>
</object>
<!-- Chat button -->
<object type="button"
name="chatButton"
style="StoneButtonFancy"
size="0 32 100% 64"
tooltip_style="sessionToolTip"
>
Chat
<action on="Press">
openChat();
</action>
</object>
<!-- Pause Button -->
<object type="button"
name="pauseButton"
style="StoneButtonFancy"
size="0 64 100% 96"
tooltip_style="sessionToolTip"
>
<object name="pauseButtonText" type="text" style="CenteredButtonText" ghost="true">Pause</object>
<action on="Press">togglePause();</action>
</object>
<!-- Pause Button -->
<object type="button"
name="pauseButton"
style="StoneButtonFancy"
size="0 64 100% 96"
tooltip_style="sessionToolTip"
>
<object name="pauseButtonText" type="text" style="CenteredButtonText" ghost="true">Pause</object>
<action on="Press">
togglePause();
</action>
</object>
<!-- Exit button -->
<object type="button"
name="menuExitButton"
style="StoneButtonFancy"
size="0 96 100% 128"
tooltip_style="sessionToolTip"
>
Quit
<action on="Press">
openExitGameDialog();
</action>
</object>
</object>
<!-- Exit button -->
<object type="button"
name="menuExitButton"
style="StoneButtonFancy"
size="0 96 100% 128"
tooltip_style="sessionToolTip"
>
Exit Game
<action on="Press">escapeKeyAction();<![CDATA[
var btCaptions = ["Yes", "No"];
var btCode = [exit, null];
messageBox(400, 200, "Are you sure you want to quit?", "Confirmation", 0, btCaptions, btCode);
]]></action>
</object>
<!-- Close button -->
<object type="button"
style="StoneButtonFancy"
size="0 128 100% 160"
tooltip_style="sessionToolTip"
>
Close
<action on="Press">closeMenu();</action>
</object>
</object>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Settings Window -->
<!-- ================================ ================================ -->
<object name="settingsDialogPanel"
style="TranslucentPanelThinBorder"
<object name="settingsDialogPanel"
style="StonePanelLight"
type="image"
size="80%-180 50%-200 50%+180 50%+50"
size="50%-180 50%-200 50%+180 50%+50"
hidden="true"
z="30"
>
<!-- Settings / shadows -->
<object size="0 10 100%-80 35" type="text" style="settingsText" ghost="true">Enable Shadows</object>
<object name="shadowsCheckbox" size="100%-56 15 100%-30 40" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.shadows) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.shadows = this.checked;</action>
</object>
<!-- Settings / Shadow PCF -->
<object size="0 35 100%-80 60" type="text" style="settingsText" ghost="true">Enable Shadow Filtering</object>
<object name="shadowPCFCheckbox" size="100%-56 40 100%-30 65" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.shadowPCF) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.shadowPCF = this.checked;</action>
<object name="sessionDialogTitleBar" size="50%-96 -16 50%+96 16" type="image" style="StoneDialogTitleBar">
<object name="sessionDialogTitle" type="text" style="TitleText" size="0 -2 100% 100%">Settings</object>
</object>
<!-- Settings / Water -->
<object size="0 60 100%-80 85" type="text" style="settingsText" ghost="true">Enable Water Reflections</object>
<object name="fancyWaterCheckbox" size="100%-56 65 100%-30 90" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.fancyWater) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.fancyWater = this.checked;</action>
</object>
<!-- Settings / Music-->
<object size="0 85 100%-80 110" type="text" style="settingsText" ghost="true">Enable Music</object>
<object size="100%-56 90 100%-30 115" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Press">if (this.checked) startMusic(); else stopMusic();</action>
</object>
<!-- Settings / Dev Overlay -->
<object size="0 110 100%-80 135" type="text" style="settingsText" ghost="true">Developer Overlay</object>
<object size="100%-56 115 100%-30 140" type="checkbox" style="wheatCrossBox" checked="false">
<action on="Press">toggleDeveloperOverlay();</action>
</object>
</object>
<object style="TranslucentPanelThinBorder"
type="image"
size="32 32 100%-32 100%-64"
>
<!-- Settings / shadows -->
<object size="0 10 100%-80 35" type="text" style="RightLabelText" ghost="true">Enable Shadows</object>
<object name="shadowsCheckbox" size="100%-56 15 100%-30 40" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.shadows) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.shadows = this.checked;</action>
</object>
<!-- Settings / Shadow PCF -->
<object size="0 35 100%-80 60" type="text" style="RightLabelText" ghost="true">Enable Shadow Filtering</object>
<object name="shadowPCFCheckbox" size="100%-56 40 100%-30 65" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.shadowPCF) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.shadowPCF = this.checked;</action>
</object>
<!-- Settings / Water -->
<object size="0 60 100%-80 85" type="text" style="RightLabelText" ghost="true">Enable Water Reflections</object>
<object name="fancyWaterCheckbox" size="100%-56 65 100%-30 90" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Load">if (renderer.fancyWater) this.checked = true; else this.checked = false;</action>
<action on="Press">renderer.fancyWater = this.checked;</action>
</object>
<!-- Settings / Music-->
<object size="0 85 100%-80 110" type="text" style="RightLabelText" ghost="true">Enable Music</object>
<object size="100%-56 90 100%-30 115" type="checkbox" style="wheatCrossBox" checked="true">
<action on="Press">if (this.checked) startMusic(); else stopMusic();</action>
</object>
<!-- Settings / Dev Overlay -->
<object size="0 110 100%-80 135" type="text" style="RightLabelText" ghost="true">Developer Overlay</object>
<object size="100%-56 115 100%-30 140" type="checkbox" style="wheatCrossBox" checked="false">
<action on="Press">toggleDeveloperOverlay();</action>
</object>
</object>
<!-- Close button -->
<object type="button"
style="StoneButton"
size="50%-64 100%-56 50%+64 100%-24"
tooltip_style="sessionToolTip"
>
Close
<action on="Press">this.parent.hidden = true</action>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Top Panel -->
@@ -344,7 +350,7 @@
<object name="topPanel"
type="image"
sprite="topPanel"
size="-3 0 100%+3 32"
size="-3 0 100%+3 40"
>
<!-- ================================ ================================ -->
<!-- Player resource bar -->
@@ -353,33 +359,33 @@
size="0 0 500 100%"
>
<!-- Food -->
<object size="6 0 96 100%" type="image" style="resourceCounter" tooltip="Food" tooltip_style="sessionToolTipBold">
<object size="0 0 34 30" type="image" style="resourceIcon" cell_id="0"/>
<object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourceFood"/>
<object size="0 0 80 100%" type="image" style="resourceCounter" tooltip="Food" tooltip_style="sessionToolTipBold">
<object size="0 -6 48 42" type="image" style="resourceIcon" cell_id="0"/>
<object size="36 0 100% 100%-2" type="text" style="resourceText" name="resourceFood"/>
</object>
<!-- Wood -->
<object size="98 0 188 100%" type="image" style="resourceCounter" tooltip="Wood" tooltip_style="sessionToolTipBold">
<object size="0 0 34 30" type="image" style="resourceIcon" cell_id="1"/>
<object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourceWood"/>
<object size="90 0 180 100%" type="image" style="resourceCounter" tooltip="Wood" tooltip_style="sessionToolTipBold">
<object size="0 -6 48 42" type="image" style="resourceIcon" cell_id="1"/>
<object size="36 0 100% 100%-2" type="text" style="resourceText" name="resourceWood"/>
</object>
<!-- Stone -->
<object size="190 0 280 100%" type="image" style="resourceCounter" tooltip="Stone" tooltip_style="sessionToolTipBold">
<object size="0 2 34 30" type="image" style="resourceIcon" cell_id="2"/>
<object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourceStone"/>
<object size="180 0 270 100%" type="image" style="resourceCounter" tooltip="Stone" tooltip_style="sessionToolTipBold">
<object size="0 -2 48 42" type="image" style="resourceIcon" cell_id="2"/>
<object size="36 0 100% 100%-2" type="text" style="resourceText" name="resourceStone"/>
</object>
<!-- Metal -->
<object size="282 0 372 100%" type="image" style="resourceCounter" tooltip="Metal" tooltip_style="sessionToolTipBold">
<object size="0 0 34 30" type="image" style="resourceIcon" cell_id="3"/>
<object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourceMetal"/>
<object size="270 0 360 100%" type="image" style="resourceCounter" tooltip="Metal" tooltip_style="sessionToolTipBold">
<object size="0 -6 48 42" type="image" style="resourceIcon" cell_id="3"/>
<object size="36 0 100% 100%-2" type="text" style="resourceText" name="resourceMetal"/>
</object>
<!-- Population -->
<object size="374 0 464 100%" type="image" style="resourceCounter" tooltip="Population (current / limit)" tooltip_style="sessionToolTipBold">
<object size="-2 0 30 28" type="image" style="resourceIcon" cell_id="4"/>
<object size="32 0 100% 100%-2" type="text" style="resourceText" name="resourcePop"/>
<object size="360 0 450 100%" type="image" style="resourceCounter" tooltip="Population (current / limit)" tooltip_style="sessionToolTipBold">
<object size="0 -6 44 38" type="image" style="resourceIcon" cell_id="4"/>
<object size="42 0 100% 100%-2" type="text" style="resourceText" name="resourcePop"/>
</object>
</object>
@@ -393,18 +399,35 @@
<!-- ================================ ================================ -->
<!--<object size="50%+50 4 50%+300 100%-2" name="PhaseTitleBar" type="text" font="serif-bold-stroke-14" textcolor="white"> Death Match :: Village Phase</object>-->
<!-- ================================ ================================ -->
<!-- ALPHA LABELS (alpha, build time, revision) -->
<!-- ================================ ================================ -->
<!-- Displays Alpha name and number -->
<object size="70%-128 1 70%+128 100%" name="alphaLabel" type="text" style="CenteredLabelText" text_valign="top" ghost="true">
ALPHA VI : Fortuna
<!-- Displays build date and revision number-->
<object size="50%-128 0 50%+128 100%-3" name="buildTimeLabel" type="text" text_align="center" text_valign="bottom" font="serif-12" textcolor="white" ghost="true">
<action on="Load"><![CDATA[this.caption = buildTime(0) + " (" + buildTime(2) + ")";]]></action>
</object>
</object>
<!-- ================================ ================================ -->
<!-- Menu Button -->
<!-- ================================ ================================ -->
<object type="button"
name="menuButton"
size="100%-80 0 100%-4 100%"
size="100%-164 4 100%-8 36"
style="StoneButtonFancy"
tooltip_style="sessionToolTip"
>
<object size="0 0 100% 100%" type="image" sprite="menuButton" name="menuButtonText" ghost="true">MENU</object>
<action on="Press">openMenuDialog();</action>
</object> <!-- END OF MENU -->
<object size="50%-32 50%-16 50%+32 50%+16" type="image" sprite="menuButton" name="menuButtonText" ghost="true">MENU</object>
<action on="Press">openMenu();</action>
</object> <!-- END OF MENU BUTTON -->
</object> <!-- END OF TOP PANEL -->
@@ -668,7 +691,7 @@
</object>
<object name="unitResearchPanel"
style="TranslucentPanel"
style="TranslucentPanelThinBorder"
size="0 100%-56 100% 100%"
type="text"
>
@@ -696,7 +719,7 @@
<object name="unitQueuePanel"
size="4 -56 100% 0"
type="image"
style="TranslucentPanel"
style="TranslucentPanelThinBorder"
>
<object size="-4 -2 52 54" type="image" sprite="snIconSheetTab" tooltip_style="sessionToolTipBottom" cell_id="3" tooltip="Production queue">
<object name="queueProgress" ghost="true" style="iconButtonProgress" type="text"/>
@@ -3,71 +3,6 @@ const FLORA = "flora";
const FAUNA = "fauna";
const SPECIAL = "special";
//-------------------------------- -------------------------------- --------------------------------
// Session Dialog (only one at a time)
//-------------------------------- -------------------------------- --------------------------------
var g_SessionDialog = new SessionDialog();
function SessionDialog()
{
this.referencedPanel = {};
}
SessionDialog.prototype.open = function(title, message, referencedPanel, x, y, confirmFunction)
{
// hide previous panel referencedPanel if applicable
if (this.referencedPanel)
this.referencedPanel.hidden = true
// set dialog title if applicable
getGUIObjectByName("sessionDialogTitle").caption = title? title : "";
// set dialog message if applicable
getGUIObjectByName("sessionDialogMessage").caption = message? message : "";
// set panel reference if applicable
if(referencedPanel)
{
referencedPanel.size = "50%-" + ((x/2)-30) + " 50%-" + ((y/2)-30) + " 50%+" + ((x/2)-30) + " 50%+" + ((y/2)-72);
referencedPanel.hidden = false;
this.referencedPanel = referencedPanel;
}
// set confirm function if applicable
if (confirmFunction)
{
var buttonFunction = function () {
this.close(referencedPanel); // "this" is defined as SessionDialog in this context
confirmFunction();
};
var dialog = this;
var confirmButton = getGUIObjectByName("sessionDialogConfirm");
confirmButton.onpress = function() { buttonFunction.call(dialog); };
confirmButton.hidden = false;
confirmButton.size = "32 100%-56 144 100%-24";
getGUIObjectByName("sessionDialogCancel").size = "100%-144 100%-56 100%-32 100%-24";
getGUIObjectByName("sessionDialogCancel").caption = "Cancel";
}
else
{
getGUIObjectByName("sessionDialogConfirm").hidden = true;
getGUIObjectByName("sessionDialogCancel").size = "50%-72 100%-56 50%+72 100%-24";
getGUIObjectByName("sessionDialogCancel").caption = "Close";
}
getGUIObjectByName("sessionDialog").size = "50%-" + x/2 + " 50%-" + y/2 + " 50%+" + x/2 + " 50%+" + y/2;
getGUIObjectByName("sessionDialog").hidden = false;
};
SessionDialog.prototype.close = function()
{
getGUIObjectByName("sessionDialog").hidden = true;
if (this.referencedPanel)
this.referencedPanel.hidden = true;
};
//-------------------------------- -------------------------------- --------------------------------
// Utility functions
//-------------------------------- -------------------------------- --------------------------------
@@ -96,7 +31,7 @@ function getPlayerData(playerAssignments)
"team": playerState.team,
"state": playerState.state,
"guid": undefined, // network guid for players controlled by hosts
"disconnected": false, // flag for host-controlled players who have left the game
"disconnected": false // flag for host-controlled players who have left the game
};
players.push(player);
}