mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-18 06:13:55 -07:00
Adopt the new interface by all pages which close themself. (Not thous using `Engine.SwitchGuiPage`.)
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
/**
|
|
* Initialize the page.
|
|
*
|
|
* @param {Object} data - Parameters passed from the code that calls this page into existence.
|
|
*/
|
|
function init(data)
|
|
{
|
|
const promise = new Promise(closePageCallback => { g_Page = new StructreePage(closePageCallback); });
|
|
|
|
if (data?.civ)
|
|
g_Page.civSelection.selectCiv(data.civ);
|
|
else
|
|
g_Page.civSelection.selectFirstCiv();
|
|
|
|
return promise;
|
|
}
|