mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-30 15:09:05 +00:00
Changes GameView to expose global functions to scripts instead of using CJSObject.
Fixes #2126 Refs #1886 This was SVN commit r13826.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "graphics/GameView.h"
|
||||
#include "graphics/MapReader.h"
|
||||
#include "gui/GUIManager.h"
|
||||
#include "graphics/scripting/JSInterface_GameView.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "lib/sysdep/sysdep.h"
|
||||
@@ -650,6 +651,8 @@ void SetBoundingBoxDebugOverlay(void* UNUSED(cbdata), bool enabled)
|
||||
|
||||
void GuiScriptingInit(ScriptInterface& scriptInterface)
|
||||
{
|
||||
JSI_GameView::RegisterScriptFunctions(scriptInterface);
|
||||
|
||||
// GUI manager functions:
|
||||
scriptInterface.RegisterFunction<CScriptVal, &GetActiveGui>("GetActiveGui");
|
||||
scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &PushGuiPage>("PushGuiPage");
|
||||
|
||||
Reference in New Issue
Block a user