1
0
forked from 0ad/0ad
0ad/binaries/data/mods/public/gui/common/functions_global_object.js
Ykkrosh 0378500bdc Fix #712 (remove S3TC warning).
Add timer to S3TC decoder so it's still easy to determine if it was
used.

This was SVN commit r8981.
2011-02-25 01:28:46 +00:00

34 lines
1016 B
JavaScript

/*
DESCRIPTION : Contains global GUI functions, which will later be accessible from every GUI script/file.
NOTES : So far, only the message box-related functions are implemented.
*/
// *******************************************
// messageBox
// *******************************************
// @params: int mbWidth, int mbHeight, string mbMessage, string mbTitle, int mbMode, arr mbButtonCaptions, arr mbButtonsCode
// @return: void
// @desc: Displays a new modal message box.
// *******************************************
function messageBox (mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCaptions, mbButtonsCode)
{
Engine.PushGuiPage("page_msgbox.xml", {
width: mbWidth,
height: mbHeight,
message: mbMessage,
title: mbTitle,
mode: mbMode,
buttonCaptions: mbButtonCaptions,
buttonCode: mbButtonsCode
});
}
// ====================================================================
function updateFPS()
{
getGUIObjectByName("fpsCounter").caption = "FPS: " + getFPS();
}