mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 12:44:46 +00:00
- Fixed issue of Query Server on-screen button tripping a join action - Added playername textEdit field to Join Server menu - Fixed issue of messageBox on-screen buttons not making the input events properly after adding the make/break check from prior commit - Added MenuTextEditProfile for editable text fields in menu - Fixed issue of not getting the correct shift key bitmap if the button name was l/rshift
43 lines
1 KiB
Plaintext
43 lines
1 KiB
Plaintext
function SystemMenu::onWake(%this)
|
|
{
|
|
$MenuList = SystemMenuButtonList;
|
|
$MenuList.listPosition = 0;
|
|
|
|
$MenuList.syncGui();
|
|
}
|
|
|
|
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 SystemMenuButton::onHighlighted(%this, %highlighted)
|
|
{
|
|
if(%highlighted)
|
|
$MenuList.listPosition = $MenuList.getObjectIndex(%this);
|
|
}
|
|
|
|
function SystemMenuButtonList::syncGUI(%this)
|
|
{
|
|
%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();
|
|
} |