mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Remove Engine.SwitchGuiPage from mod
This commit is contained in:
parent
3126a249d2
commit
434a1a1905
3 changed files with 8 additions and 10 deletions
|
|
@ -71,6 +71,9 @@ function init(data, hotloadData)
|
|||
return new Promise(closePageCallback =>
|
||||
{
|
||||
Engine.GetGUIObjectByName("quitButton").onPress = closePageCallback;
|
||||
Engine.GetGUIObjectByName("cancelButton").onPress = closePageCallback.bind(undefined, {
|
||||
[Engine.openRequest]: { "page": "page_pregame.xml" }
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -293,11 +296,6 @@ function filterMod(folder)
|
|||
return !negateFilter;
|
||||
}
|
||||
|
||||
function closePage()
|
||||
{
|
||||
Engine.SwitchGuiPage("page_pregame.xml", {});
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves an item in the list up or down.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -194,7 +194,6 @@
|
|||
|
||||
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16" hotkey="cancel">
|
||||
<translatableAttribute id="caption">Cancel</translatableAttribute>
|
||||
<action on="Press">closePage();</action>
|
||||
</object>
|
||||
|
||||
<object type="button" style="ModernButtonRed" size="100%-748 100%-44 100%-568 100%-16">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
function init()
|
||||
async function init()
|
||||
{
|
||||
Engine.SwitchGuiPage("page_modmod.xml", {
|
||||
"cancelbutton": false
|
||||
});
|
||||
return { [Engine.openRequest]: {
|
||||
"page": "page_modmod.xml",
|
||||
"argument": { "cancelbutton": false }
|
||||
} };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue