mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Ongoing wipwork of the BaseUI update. Some bugfixes pending
This commit is contained in:
parent
616d974212
commit
ce4c8dabc9
53 changed files with 2033 additions and 3892 deletions
37
Templates/BaseGame/game/data/UI/guis/SystemMenu.tscript
Normal file
37
Templates/BaseGame/game/data/UI/guis/SystemMenu.tscript
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
function SystemMenu::onWake(%this)
|
||||
{
|
||||
$MenuList = SystemMenuButtonList;
|
||||
$MenuList.listPosition = 0;
|
||||
}
|
||||
|
||||
function SystemMenu::onSleep(%this)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function systemMenuExitToMenu()
|
||||
{
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the Main Menu?", "escapeFromGame();", "");
|
||||
}
|
||||
|
||||
function systemMenuExitToDesktop()
|
||||
{
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the desktop?", "quit();", "");
|
||||
}
|
||||
|
||||
function SystemMenuButtonList::syncGUI(%this)
|
||||
{
|
||||
%this.callOnChildren("setHighlighted", false);
|
||||
|
||||
%btn = %this.getObject(%this.listPosition);
|
||||
%btn.setHighlighted(true);
|
||||
|
||||
//
|
||||
//Update the button imagery to comply to the last input device we'd used
|
||||
%device = Canvas.getLastInputDevice();
|
||||
if(%device $= "mouse")
|
||||
%device = "keyboard";
|
||||
|
||||
//We'll call back to the GameMenu parent just to be sure everything's on the same page
|
||||
GameMenu.syncGui();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue