0ad/binaries/data/mods/mod/gui/modmod/help/help.js
phosit 094a7c2268 Return a promise from most page-inits
Adopt the new interface by all pages which close themself. (Not thous
using `Engine.SwitchGuiPage`.)
2025-03-09 10:39:20 +01:00

7 lines
261 B
JavaScript

function init(data)
{
Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile("gui/modmod/help/help.txt"));
return new Promise(closePageCallback => {
Engine.GetGUIObjectByName("closeButton").onPress = closePageCallback;
});
}