mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-21 18:21:41 +00:00
Remove Engine.PopGuiPage
Remove the old now unused interface.
This commit is contained in:
@@ -138,13 +138,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)
|
||||
{
|
||||
|
||||
@@ -73,12 +73,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");
|
||||
|
||||
Reference in New Issue
Block a user