0ad/binaries/data/mods/mod/gui/common/functions_msgbox.js
phosit df5fee6103 Rename PushGuiPage to OpenChildPage
There is no `PopGuiPage` anymore. For symmetry there should also be no
`PushGuiPage`.
2025-03-09 10:39:20 +01:00

40 lines
814 B
JavaScript

function messageBox(width, height, message, title, buttonCaptions)
{
return Engine.OpenChildPage(
"page_msgbox.xml",
{
"width": width,
"height": height,
"message": message,
"title": title,
"buttonCaptions": buttonCaptions
});
}
function timedConfirmation(width, height, message, timeParameter, timeout, title, buttonCaptions)
{
return Engine.OpenChildPage(
"page_timedconfirmation.xml",
{
"width": width,
"height": height,
"message": message,
"timeParameter": timeParameter,
"timeout": timeout,
"title": title,
"buttonCaptions": buttonCaptions
});
}
function openURL(url)
{
Engine.OpenURL(url);
messageBox(
600, 200,
sprintf(
translate("Opening %(url)s\n in default web browser. Please wait…"),
{ "url": url }
),
translate("Opening page"));
}