Index: ps/trunk/binaries/data/mods/public/gui/common/functions_global_object.js
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/common/functions_global_object.js (revision 15061)
+++ ps/trunk/binaries/data/mods/public/gui/common/functions_global_object.js (revision 15062)
@@ -1,74 +1,81 @@
/*
DESCRIPTION : Contains global GUI functions, which will later be accessible from every GUI script/file.
NOTES : So far, only the message box-related functions are implemented.
*/
// *******************************************
// messageBox
// *******************************************
// @params: int mbWidth, int mbHeight, string mbMessage, string mbTitle, int mbMode, arr mbButtonCaptions, function mbBtnCode, var mbCallbackArgs
// @return: void
// @desc: Displays a new modal message box.
// *******************************************
// We want to pass callback functions for the different buttons in a convenient way.
// Because passing functions accross compartment boundaries is a pain, we just store them here together with some optional arguments.
// The messageBox page will return the code of the pressed button and the according function will be called.
var g_messageBoxBtnFunctions = [];
var g_messageBoxCallbackArgs = [];
var g_messageBoxCallbackFunction = function(btnCode)
{
if (btnCode !== undefined && g_messageBoxBtnFunctions[btnCode])
{
// Cache the variables to make it possible to call a messageBox from a callback function.
var callbackFunction = g_messageBoxBtnFunctions[btnCode];
var callbackArgs = g_messageBoxCallbackArgs[btnCode]
g_messageBoxBtnFunctions = [];
g_messageBoxCallbackArgs = [];
if (callbackArgs !== undefined)
callbackFunction(callbackArgs);
else
callbackFunction();
return;
}
g_messageBoxBtnFunctions = [];
g_messageBoxCallbackArgs = [];
}
function messageBox (mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCaptions, mbBtnCode, mbCallbackArgs)
{
if (g_messageBoxBtnFunctions && g_messageBoxBtnFunctions.length != 0)
{
warn("A messagebox was called when a previous callback function is still set, aborting!");
return;
}
g_messageBoxBtnFunctions = mbBtnCode;
if (mbCallbackArgs)
g_messageBoxCallbackArgs = mbCallbackArgs;
var initData = {
width: mbWidth,
height: mbHeight,
message: mbMessage,
title: mbTitle,
mode: mbMode,
buttonCaptions: mbButtonCaptions,
}
if (mbBtnCode)
initData.callback = "g_messageBoxCallbackFunction";
Engine.PushGuiPage("page_msgbox.xml", initData);
}
// ====================================================================
+
+function openURL(url)
+{
+ Engine.OpenURL(url);
+ messageBox(600, 200, sprintf(translate("Opening %(url)s\n in default web browser. Please wait..."), { url: url }), translate("Opening page"), 2);
+}
+
function updateFPS()
{
Engine.GetGUIObjectByName("fpsCounter").caption = sprintf(translate("FPS: %(fps)s"), { fps: Engine.GetFPS() });
}
Index: ps/trunk/binaries/data/mods/public/gui/manual/manual.xml
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/manual/manual.xml (revision 15061)
+++ ps/trunk/binaries/data/mods/public/gui/manual/manual.xml (revision 15062)
@@ -1,33 +1,31 @@
Index: ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml (revision 15061)
+++ ps/trunk/binaries/data/mods/public/gui/pregame/mainmenu.xml (revision 15062)
@@ -1,601 +1,594 @@
+
onTick();
tooltipText
[font="sans-bold-16"]Help improve 0 A.D.![/font]\nYou can automatically send us anonymous feedback that will help us fix bugs, and improve performance and compatibility.Enable feedbackEnableUserReport(true);Technical detailsEngine.PushGuiPage("page_manual.xml", { "page": "userreport" });[font="sans-bold-16"]Thank you for helping improve 0 A.D.![/font]\n\nAnonymous feedback is currently enabled.\nStatus: $status.Disable feedbackEnableUserReport(false);Technical detailsEngine.PushGuiPage("page_manual.xml", { "page": "userreport" });
closeMenu();
MatchesClick here to start a new single player game.
Engine.SwitchGuiPage("page_gamesetup.xml", { type: "offline" });
CampaignsRelive history through historical military campaigns. [NOT YET IMPLEMENTED]
closeMenu();
Load GameClick here to load a saved game.
closeMenu();
Engine.PushGuiPage("page_loadgame.xml", { type: "offline" });
Join GameJoining an existing multiplayer game.
closeMenu();
// Open Multiplayer connection window with join option.
Engine.PushGuiPage("page_gamesetup_mp.xml", { multiplayerGameType: "join" });
Host GameHost a multiplayer game.\n\nRequires UDP port 20595 to be open.
closeMenu();
// Open Multiplayer connection window with host option.
Engine.PushGuiPage("page_gamesetup_mp.xml", { multiplayerGameType: "host" });
Game LobbyLaunch the multiplayer lobby.
closeMenu();
// Open Multiplayer game lobby.
Engine.PushGuiPage("page_prelobby.xml", []);
if (!Engine.StartXmppClient)
{
this.enabled = false;
this.tooltip = getLobbyDisabledByBuild();
}
OptionsAdjust game settings.
closeMenu();
LanguageChoose the language of the game.Scenario EditorOpen the Atlas Scenario Editor in a new window. You can run this more reliably by starting the game with the command-line argument "-editor".
pressedScenarioEditorButton();
Welcome ScreenShow the Welcome Screen. Useful if you hid it by mistake.Learn To PlayOpen the 0 A.D. Game Manual.
closeMenu();
Single PlayerChallenge the computer player to a single player match.
closeMenu();
openMenu("submenuSinglePlayer", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 3);
MultiplayerFight against one or more human players in a multiplayer game.
closeMenu();
openMenu("submenuMultiplayer", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 3);
Tools & OptionsGame options and scenario design tools.
closeMenu();
openMenu("submenuToolsAndOptions", (this.parent.size.top+this.size.top), (this.size.bottom-this.size.top), 4);
HistoryLearn about the many civilizations featured in 0 A.D.
closeMenu();
ExitExits the game.exitGamePressed();[font="sans-bold-16"]Alpha XV: Osiris[/font]\n\nWARNING: This is an early development version of the game. Many features have not been added yet.\n\nGet involved at: play0ad.comWebsiteClick to open play0ad.com in your web browser.ChatClick to open the 0 A.D. IRC chat in your browser. (#0ad on webchat.quakenet.org)Help with the translation!
- Click to open the 0 A.D translate page in your brownser.
+ Click to open the 0 A.D translate page in your browser.Report a BugClick to visit 0 A.D. Trac to report a bug, crash, or error.WILDFIRE GAMES
this.caption = getBuildString();
Index: ps/trunk/binaries/data/mods/public/gui/splashscreen/splashscreen.js
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/splashscreen/splashscreen.js (revision 15061)
+++ ps/trunk/binaries/data/mods/public/gui/splashscreen/splashscreen.js (revision 15062)
@@ -1,11 +1,5 @@
function init(data)
{
Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile("gui/splashscreen/" + data.page + ".txt"));
Engine.GetGUIObjectByName("displaySplashScreen").checked = (Engine.ConfigDB_GetValue("user", "splashscreenversion") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"));
}
-
-function openURL(url)
-{
- Engine.OpenURL(url);
- messageBox(600, 200, sprintf(translate("Opening %(url)s\n in default web browser. Please wait..."), { url: url }), translate("Opening page"), 2);
-}