mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 05:44:08 -07:00
Allows coding the GUI without global functions which break prototype-oriented coding, refs #5322, fixing the concern in4b1297b328. Supports stacked message boxes and removes the according workaround. Change structree / civinfo switch-dialog code from760a47335dto perform the callback for page that actually registered the callback. Ensure the parent that the callbackhandler is always called if the page is closed. Merge PopGuiPage and PopGuiPageCB following that choice, incidentally leaving cleaner code. Differential Revision: https://code.wildfiregames.com/D1684 Comments by: Yves, Vladislav, wraitii, leper This was SVN commit r22676.
30 lines
578 B
JavaScript
30 lines
578 B
JavaScript
function downloadModsButton()
|
|
{
|
|
initTerms({
|
|
"Disclaimer": {
|
|
"title": translate("Disclaimer"),
|
|
"file": "gui/modio/Disclaimer.txt",
|
|
"config": "modio.disclaimer",
|
|
"accepted": false,
|
|
"callback": openModIo,
|
|
"urlButtons": [
|
|
{
|
|
"caption": translate("mod.io Terms"),
|
|
"url": "https://mod.io/terms"
|
|
},
|
|
{
|
|
"caption": translate("mod.io Privacy Policy"),
|
|
"url": "https://mod.io/privacy"
|
|
}
|
|
]
|
|
}
|
|
});
|
|
|
|
openTerms("Disclaimer");
|
|
}
|
|
|
|
function openModIo(data)
|
|
{
|
|
if (data.accepted)
|
|
Engine.PushGuiPage("page_modio.xml", {}, initMods);
|
|
}
|