1
0
forked from mirrors/0ad

Remove Engine.SwitchGuiPage from mod

This commit is contained in:
phosit
2025-04-24 18:09:03 +02:00
parent 3126a249d2
commit 434a1a1905
3 changed files with 8 additions and 10 deletions
+3 -5
View File
@@ -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 }
} };
}