Remove Engine.PopGuiPage
This commit is contained in:
parent
a91d849489
commit
e3d4719aa9
@ -137,13 +137,6 @@ JS::Value CGUIManager::PushPage(const CStrW& pageName, Script::StructuredClone i
|
||||
return promise;
|
||||
}
|
||||
|
||||
void CGUIManager::PopPage(JS::HandleValue arg)
|
||||
{
|
||||
SGUIPage& topmostPage{m_PageStack.back()};
|
||||
const ScriptRequest rq{topmostPage.gui->GetScriptInterface()};
|
||||
JS::ResolvePromise(rq.cx, *topmostPage.sendingPromise, arg);
|
||||
}
|
||||
|
||||
CGUIManager::SGUIPage::SGUIPage(const CStrW& pageName, const Script::StructuredClone initData)
|
||||
: m_Name(pageName), initData(initData)
|
||||
{
|
||||
|
@ -72,12 +72,6 @@ public:
|
||||
*/
|
||||
JS::Value PushPage(const CStrW& pageName, Script::StructuredClone initData);
|
||||
|
||||
/**
|
||||
* Unload the currently active GUI page, and make the previous page active.
|
||||
* (There must be at least two pages when you call this.)
|
||||
*/
|
||||
void PopPage(JS::HandleValue arg);
|
||||
|
||||
/**
|
||||
* Called when a file has been modified, to hotload changes.
|
||||
*/
|
||||
|
@ -43,17 +43,6 @@ void SwitchGuiPage(const ScriptInterface& scriptInterface, const std::wstring& n
|
||||
g_GUI->SwitchPage(name, &scriptInterface, initData);
|
||||
}
|
||||
|
||||
void PopGuiPage(const ScriptRequest& rq, JS::HandleValue args)
|
||||
{
|
||||
if (g_GUI->GetPageCount() < 2)
|
||||
{
|
||||
ScriptException::Raise(rq, "Can't pop GUI pages when less than two pages are opened!");
|
||||
return;
|
||||
}
|
||||
|
||||
g_GUI->PopPage(args);
|
||||
}
|
||||
|
||||
void SetCursor(const std::wstring& name)
|
||||
{
|
||||
g_VideoMode.SetCursor(name);
|
||||
@ -79,7 +68,6 @@ void RegisterScriptFunctions(const ScriptRequest& rq)
|
||||
{
|
||||
ScriptFunction::Register<&PushGuiPage>(rq, "PushGuiPage");
|
||||
ScriptFunction::Register<&SwitchGuiPage>(rq, "SwitchGuiPage");
|
||||
ScriptFunction::Register<&PopGuiPage>(rq, "PopGuiPage");
|
||||
ScriptFunction::Register<&SetCursor>(rq, "SetCursor");
|
||||
ScriptFunction::Register<&ResetCursor>(rq, "ResetCursor");
|
||||
ScriptFunction::Register<&TemplateExists>(rq, "TemplateExists");
|
||||
|
Loading…
Reference in New Issue
Block a user