2017-02-24 08:40:56 +00:00
|
|
|
|
|
|
|
|
// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows:
|
|
|
|
|
|
|
|
|
|
// First, a client will always create a server in the event that they want to host a single player
|
|
|
|
|
// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff
|
|
|
|
|
// in the networking short-circuited to sidestep around lag and packet transmission times.
|
|
|
|
|
|
|
|
|
|
// initServer() is called, loading the default server scripts.
|
|
|
|
|
// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called
|
|
|
|
|
// to prep a playable client session.
|
|
|
|
|
|
|
|
|
|
// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is
|
|
|
|
|
// connected to it via createAndConnectToLocalServer().
|
|
|
|
|
|
2019-09-02 21:13:24 +00:00
|
|
|
function UI::onCreate( %this )
|
2017-02-24 08:40:56 +00:00
|
|
|
{
|
2019-08-29 05:22:33 +00:00
|
|
|
}
|
|
|
|
|
|
2019-09-02 21:13:24 +00:00
|
|
|
function UI::onDestroy( %this )
|
2019-08-29 05:22:33 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function UI::initServer(%this){}
|
|
|
|
|
|
2019-09-02 21:13:24 +00:00
|
|
|
function UI::onCreateGameServer(%this){}
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2019-09-02 21:13:24 +00:00
|
|
|
function UI::onDestroyGameServer(%this){}
|
2019-08-29 05:22:33 +00:00
|
|
|
|
|
|
|
|
function UI::initClient(%this)
|
|
|
|
|
{
|
2017-02-24 08:40:56 +00:00
|
|
|
//Load UI stuff
|
|
|
|
|
//we need to load this because some of the menu profiles use the sounds here
|
2021-07-20 16:02:38 +00:00
|
|
|
//%this.queueExec("./datablocks/guiSounds");
|
2017-02-24 08:40:56 +00:00
|
|
|
|
|
|
|
|
//Profiles
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./scripts/profiles");
|
2017-02-24 08:40:56 +00:00
|
|
|
|
2022-05-07 04:39:16 +00:00
|
|
|
//Navigation Utility Scripts
|
|
|
|
|
%this.queueExec("./scripts/menuNavigation");
|
|
|
|
|
|
2017-02-24 08:40:56 +00:00
|
|
|
//Now gui files
|
2022-02-18 00:21:13 +00:00
|
|
|
%this.queueExec("./scripts/menuInputHandling");
|
2020-05-20 22:19:52 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/mainMenu");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/mainMenu.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2022-05-07 04:39:16 +00:00
|
|
|
%this.queueExec("./guis/mainMenuButtons");
|
|
|
|
|
%this.queueExec("./guis/mainMenuButtons.gui");
|
|
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/chooseLevelDlg");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/chooseLevelDlg.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/joinServerMenu");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/joinServerMenu.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/loadingGui.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/optionsMenu");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/optionsMenu.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/pauseMenu");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/pauseMenu.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/remapDlg.gui");
|
|
|
|
|
%this.queueExec("./guis/remapConfirmDlg.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/profiler");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/profiler.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/netGraphGui.gui");
|
|
|
|
|
%this.queueExec("./guis/RecordingsDlg.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/guiMusicPlayer");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/guiMusicPlayer.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./guis/startupGui");
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/startupGui.gui");
|
2019-08-29 05:22:33 +00:00
|
|
|
|
2019-09-29 12:51:43 +00:00
|
|
|
// Load Editor Dialogs
|
2020-10-05 20:50:45 +00:00
|
|
|
%this.queueExec("./guis/messageBoxDlg.gui");
|
2019-09-29 12:51:43 +00:00
|
|
|
|
2019-08-29 05:22:33 +00:00
|
|
|
//Load scripts
|
2021-07-20 16:02:38 +00:00
|
|
|
%this.queueExec("./scripts/controlsMenu");
|
|
|
|
|
%this.queueExec("./scripts/messageBoxes");
|
|
|
|
|
%this.queueExec("./scripts/help");
|
|
|
|
|
%this.queueExec("./scripts/cursors");
|
|
|
|
|
%this.queueExec("./scripts/utility");
|
2017-02-24 08:40:56 +00:00
|
|
|
}
|
|
|
|
|
|
2019-08-29 05:22:33 +00:00
|
|
|
function UI::onCreateClientConnection(%this){}
|
|
|
|
|
|
2022-02-23 02:12:39 +00:00
|
|
|
function UI::onDestroyClientConnection(%this){}
|