mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 15:34:37 +00:00
Support creating lobby GUI messages with arbitrary arguments instead of forcing every message type into the same struct type, refs #4877 / 76bc9b579a / D339.
Creates the GUI messages directly as JS::Values and removes the intermediary rigid struct. Implementation similar to ScriptInterface::CreateObject from D2080. Differential Revision: https://code.wildfiregames.com/D2264 Tested on: clang 8.0.1, Jenkins This was SVN commit r22856.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "JSInterface_Lobby.h"
|
||||
|
||||
#include "gui/GUIManager.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "lobby/IXmppClient.h"
|
||||
#include "network/NetServer.h"
|
||||
@@ -92,7 +93,7 @@ void JSI_Lobby::StartXmppClient(ScriptInterface::CxPrivate* UNUSED(pCxPrivate),
|
||||
{
|
||||
ENSURE(!g_XmppClient);
|
||||
|
||||
g_XmppClient = IXmppClient::create(utf8_from_wstring(username), utf8_from_wstring(password),
|
||||
g_XmppClient = IXmppClient::create(g_GUI->GetScriptInterface().get(), utf8_from_wstring(username), utf8_from_wstring(password),
|
||||
utf8_from_wstring(room), utf8_from_wstring(nick), historyRequestSize);
|
||||
g_rankedGame = true;
|
||||
}
|
||||
@@ -101,7 +102,7 @@ void JSI_Lobby::StartRegisterXmppClient(ScriptInterface::CxPrivate* UNUSED(pCxPr
|
||||
{
|
||||
ENSURE(!g_XmppClient);
|
||||
|
||||
g_XmppClient = IXmppClient::create(utf8_from_wstring(username), utf8_from_wstring(password),
|
||||
g_XmppClient = IXmppClient::create(g_GUI->GetScriptInterface().get(), utf8_from_wstring(username), utf8_from_wstring(password),
|
||||
"", "", 0, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user