mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Adjusted init'ing logic to defer to project settings for the name of the play gui and mainMenu gui instead of hardcoding them
This commit is contained in:
parent
e6e2ee0d50
commit
fee1ceab3c
18 changed files with 151 additions and 134 deletions
|
|
@ -45,8 +45,11 @@ function GameConnection::initialControlSet(%this)
|
|||
// first check if the editor is active
|
||||
if (!isToolBuild() || !isMethod("Editor", "checkActiveLoadDone") || !Editor::checkActiveLoadDone())
|
||||
{
|
||||
if (isObject(PlayGui) && Canvas.getContent() != PlayGui.getId())
|
||||
Canvas.setContent(PlayGui);
|
||||
%playGUIName = ProjectSettings.value("UI/playGUIName");
|
||||
Canvas.setContent(%playGUIName);
|
||||
|
||||
if (isObject(%playGUIName) && Canvas.getContent() != %playGUIName.getId())
|
||||
Canvas.setContent(%playGUIName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -117,8 +120,9 @@ function disconnectedCleanup()
|
|||
$sceneLighting::terminateLighting = true;
|
||||
|
||||
// Back to the launch screen
|
||||
if (isObject( MainMenuGui ))
|
||||
Canvas.setContent( MainMenuGui );
|
||||
%mainMenuGUI = ProjectSettings.value("UI/mainMenuName");
|
||||
if (isObject( %mainMenuGUI ))
|
||||
Canvas.setContent( %mainMenuGUI );
|
||||
|
||||
// Before we destroy the client physics world
|
||||
// make sure all ServerConnection objects are deleted.
|
||||
|
|
|
|||
|
|
@ -107,8 +107,9 @@ function createAndConnectToLocalServer( %serverType, %level )
|
|||
|
||||
MessageBoxOK("Error starting local server!", "There was an error when trying to connect to the local server.");
|
||||
|
||||
if(isObject(MainMenuGui))
|
||||
Canvas.setContent(MainMenuGui);
|
||||
%mainMenuGUI = ProjectSettings.value("UI/mainMenuName");
|
||||
if (isObject( %mainMenuGUI ))
|
||||
Canvas.setContent( %mainMenuGUI );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<ProjectSettings>
|
||||
<Group name="UI">
|
||||
<Setting name="mainMenuName">MainMenuGUI</Setting>
|
||||
<Setting name="playGUIName">PlayGUI</Setting>
|
||||
</Group>
|
||||
<Group name="AssetManagement">
|
||||
<Group name="Modules">
|
||||
<Setting name="coreModulePath">core/</Setting>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue