mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Remove Engine.PopGuiPage
Remove the old now unused interface.
This commit is contained in:
parent
094a7c2268
commit
d0ab2cb783
3 changed files with 0 additions and 25 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue