From 39fef5c2996b7341a3e5280f5829ed56b660985a Mon Sep 17 00:00:00 2001 From: JoshuaJB Date: Sun, 26 Jan 2014 05:39:55 +0000 Subject: [PATCH] Add the ability to display chat messages when joining the lobby and quickly mostly update the options window to the new UI style. This was SVN commit r14679. --- binaries/data/config/default.cfg | 1 + .../data/mods/public/gui/lobby/prelobby.js | 3 +- .../data/mods/public/gui/options/options.xml | 59 ++++++++++++------- .../data/mods/public/gui/page_options.xml | 5 ++ source/gui/scripting/ScriptFunctions.cpp | 2 +- source/lobby/IXmppClient.h | 2 +- source/lobby/XmppClient.cpp | 19 ++++-- source/lobby/XmppClient.h | 2 +- source/lobby/scripting/JSInterface_Lobby.cpp | 4 +- source/lobby/scripting/JSInterface_Lobby.h | 2 +- 10 files changed, 64 insertions(+), 35 deletions(-) diff --git a/binaries/data/config/default.cfg b/binaries/data/config/default.cfg index 420a2e0188..3d81e114f2 100644 --- a/binaries/data/config/default.cfg +++ b/binaries/data/config/default.cfg @@ -360,3 +360,4 @@ lobby.server = "lobby.wildfiregames.com" ; Address of lobby server lobby.xpartamupp = "wfgbot16" ; Name of the server-side xmpp client that manage games lobby.chattimestamp = false ; Show time chat message was posted lobby.room = "arena16" ; Default MUC room to join +lobby.history = 0 ; Number of past messages to display on join diff --git a/binaries/data/mods/public/gui/lobby/prelobby.js b/binaries/data/mods/public/gui/lobby/prelobby.js index cbe332b2d3..222151c5be 100644 --- a/binaries/data/mods/public/gui/lobby/prelobby.js +++ b/binaries/data/mods/public/gui/lobby/prelobby.js @@ -30,13 +30,14 @@ function lobbyStart() var password = Engine.GetGUIObjectByName("connectPassword").caption; var feedback = Engine.GetGUIObjectByName("feedback"); var room = Engine.ConfigDB_GetValue("user", "lobby.room"); + var history = Number(Engine.ConfigDB_GetValue("user", "lobby.history")); feedback.caption = "Connecting...."; // If they enter a different password, re-encrypt. if (password != g_EncrytedPassword.substring(0, 10)) g_EncrytedPassword = Engine.EncryptPassword(password, username); // We just use username as nick for simplicity. - Engine.StartXmppClient(username, g_EncrytedPassword, room, username); + Engine.StartXmppClient(username, g_EncrytedPassword, room, username, history); g_LobbyIsConnecting = true; Engine.ConnectXmppClient(); } diff --git a/binaries/data/mods/public/gui/options/options.xml b/binaries/data/mods/public/gui/options/options.xml index e0e2f125d6..391bde811f 100644 --- a/binaries/data/mods/public/gui/options/options.xml +++ b/binaries/data/mods/public/gui/options/options.xml @@ -7,58 +7,73 @@ --> -