2009-12-03 21:17:22 +01:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
// @return: void
|
|
|
|
// @desc: Displays a new modal message box.
|
|
|
|
// *******************************************
|
|
|
|
|
|
|
|
function messageBox (mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCaptions, mbButtonsCode)
|
|
|
|
{
|
|
|
|
|
2010-01-09 20:20:14 +01:00
|
|
|
Engine.PushGuiPage("page_msgbox.xml", {
|
2009-12-03 21:17:22 +01:00
|
|
|
width: mbWidth,
|
|
|
|
height: mbHeight,
|
|
|
|
message: mbMessage,
|
|
|
|
title: mbTitle,
|
|
|
|
mode: mbMode,
|
|
|
|
buttonCaptions: mbButtonCaptions,
|
|
|
|
buttonCode: mbButtonsCode
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====================================================================
|
|
|
|
|
|
|
|
function updateFPS()
|
|
|
|
{
|
|
|
|
getGUIObjectByName("fpsCounter").caption = "FPS: " + getFPS();
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====================================================================
|