mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
Implements a more standardized way to format usual UI pages by having the ability to utilize the UINavigation namespace for page stack navigation
Also fixes behavior handling of menu input buttons not refreshing reliably Adds ability to define a control on a MenuList to act as a highlighter over the currently selected control Cleaned up BaseUI pages to use UINavigation which reduced a lot of duplication of elements and code
This commit is contained in:
parent
22db2d4291
commit
41add628ad
20 changed files with 811 additions and 1217 deletions
|
|
@ -23,6 +23,8 @@ function PauseMenu::onWake(%this)
|
|||
PauseMenuList.setAsActiveMenuList();
|
||||
PauseButtonHolder.setActive();
|
||||
PauseMenuInputHandler.setFirstResponder();
|
||||
|
||||
%this.resizePages = true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -35,37 +37,28 @@ function PauseMenu::onSleep(%this)
|
|||
}
|
||||
}
|
||||
|
||||
function PauseMenu::onReturnTo(%this)
|
||||
{
|
||||
PauseMenuList.hidden = false;
|
||||
PauseMenuList.setAsActiveMenuList();
|
||||
PauseButtonHolder.setActive();
|
||||
PauseMenuInputHandler.setFirstResponder();
|
||||
}
|
||||
|
||||
function openPauseMenuOptions()
|
||||
{
|
||||
Canvas.pushDialog(OptionsMenu);
|
||||
OptionsMenu.returnGui = PauseMenu;
|
||||
PauseMenuList.hidden = true;
|
||||
PauseMenu.pushPage(OptionsMenu);
|
||||
}
|
||||
|
||||
function pauseMenuExitToMenu()
|
||||
{
|
||||
PauseMenuList.hidden = true;
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the Main Menu?", "escapeFromGame();", "PauseMenu.onReturnTo();");
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the Main Menu?", "escapeFromGame();", "");
|
||||
}
|
||||
|
||||
function pauseMenuExitToDesktop()
|
||||
{
|
||||
PauseMenuList.hidden = true;
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the desktop?", "quit();", "PauseMenu.onReturnTo();");
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the desktop?", "quit();", "");
|
||||
}
|
||||
|
||||
function PauseButtonHolder::onWake(%this)
|
||||
{
|
||||
%this-->goButton.set("btn_a", "Return", "OK", "PauseMenuList.activate();", true);
|
||||
%this-->backButton.set("btn_b", "Escape", "Back", "Canvas.popDialog();");
|
||||
%this-->button1.disable();
|
||||
%this-->button2.disable();
|
||||
%this-->button3.disable();
|
||||
%this-->button4.set("btn_a", "", "OK", "PauseMenuList.activate();");
|
||||
%this-->button4.set("btn_b", "Escape", "Back", "Canvas.popDialog();");
|
||||
}
|
||||
|
||||
function PauseMenu::addPauseMenuButton(%this, %buttonText, %buttonCallback)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue