Changeset View
Changeset View
Standalone View
Standalone View
source/gui/Scripting/JSInterface_GUIManager.cpp
Show All 35 Lines | |||||
{ | { | ||||
g_GUI->SwitchPage(name, pCmptPrivate->pScriptInterface, initData); | g_GUI->SwitchPage(name, pCmptPrivate->pScriptInterface, initData); | ||||
} | } | ||||
void JSI_GUIManager::PopGuiPage(ScriptInterface::CmptPrivate* pCmptPrivate, JS::HandleValue args) | void JSI_GUIManager::PopGuiPage(ScriptInterface::CmptPrivate* pCmptPrivate, JS::HandleValue args) | ||||
{ | { | ||||
if (g_GUI->GetPageCount() < 2) | if (g_GUI->GetPageCount() < 2) | ||||
{ | { | ||||
ScriptInterface::Request rq(pCmptPrivate); | ScriptRequest rq(pCmptPrivate->pScriptInterface); | ||||
JS_ReportError(rq.cx, "Can't pop GUI pages when less than two pages are opened!"); | ScriptException::Raise(rq, "Can't pop GUI pages when less than two pages are opened!"); | ||||
return; | return; | ||||
} | } | ||||
g_GUI->PopPage(pCmptPrivate->pScriptInterface->WriteStructuredClone(args)); | g_GUI->PopPage(pCmptPrivate->pScriptInterface->WriteStructuredClone(args)); | ||||
} | } | ||||
JS::Value JSI_GUIManager::GetGUIObjectByName(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& name) | JS::Value JSI_GUIManager::GetGUIObjectByName(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& name) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator