mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 22:53:47 +00:00
Merge pull request #396 from Areloch/EditorAwarePauseMenu
Adds handling so the pause menu has a button to exit the editor as a quick shortcut
This commit is contained in:
commit
eb51b8a4b6
2 changed files with 12 additions and 8 deletions
|
|
@ -1,10 +1,3 @@
|
|||
function PauseMenuList::onAdd(%this)
|
||||
{
|
||||
%this.addRow("Options", "openPauseMenuOptions", -1, -30);
|
||||
%this.addRow("Exit to Menu", "pauseMenuExitToMenu", -1, -30);
|
||||
%this.addRow("Exit to Desktop", "pauseMenuExitToDesktop", -1, -30);
|
||||
}
|
||||
|
||||
function PauseMenu::onWake(%this)
|
||||
{
|
||||
if($Server::ServerType $= "SinglePlayer")
|
||||
|
|
@ -17,6 +10,17 @@ function PauseMenu::onWake(%this)
|
|||
PauseMenuList.hidden = false;
|
||||
PauseMenuList.setFirstResponder();
|
||||
PauseButtonHolder.setActive();
|
||||
|
||||
PauseMenuList.clearRows();
|
||||
|
||||
if($Tools::loaded && EditorIsActive())
|
||||
{
|
||||
PauseMenuList.addRow("Exit Editor", "fastLoadWorldEdit", -1, -30);
|
||||
}
|
||||
|
||||
PauseMenuList.addRow("Options", "openPauseMenuOptions", -1, -30);
|
||||
PauseMenuList.addRow("Exit to Menu", "pauseMenuExitToMenu", -1, -30);
|
||||
PauseMenuList.addRow("Exit to Desktop", "pauseMenuExitToDesktop", -1, -30);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ function EditorCreateFakeGameSession(%fileName)
|
|||
|
||||
function fastLoadWorldEdit(%val)
|
||||
{
|
||||
if(%val)
|
||||
if(%val || %val $= "")
|
||||
{
|
||||
if(!$Tools::loaded)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue