Torque3D/Templates/BaseGame/game/data/UI/UI.tscript

100 lines
3.1 KiB
Plaintext
Raw Normal View History

// 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().
function UI::onCreate( %this )
{
exec("./scripts/utility");
// create and set as core a defaultTable LanguageTable for localization purposes
// example usage for quick language appending
// addLanguage("defaultTable","check","ch");
// addLanguage("defaultTable","try","tr");
createLangTable("defaultTable");
setCoreLangTable("defaultTable");
exec("./langs/languageMap");
}
function UI::onDestroy( %this )
{
}
function UI::initServer(%this){}
function UI::onCreateGameServer(%this){}
function UI::onDestroyGameServer(%this){}
function UI::initClient(%this)
{
//Load UI stuff
//Profiles
%this.queueExec("./scripts/profiles");
//Navigation Utility Scripts
//%this.queueExec("./scripts/menuNavigation");
//Now gui files
2022-02-18 00:21:13 +00:00
%this.queueExec("./scripts/menuInputHandling");
%this.queueExec("./guis/mainMenu");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/mainMenu.gui");
//%this.queueExec("./guis/mainMenuButtons");
//%this.queueExec("./guis/mainMenuButtons.gui");
%this.queueExec("./guis/chooseLevelDlg");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/chooseLevelDlg.gui");
%this.queueExec("./guis/joinServerMenu");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/joinServerMenu.gui");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/loadingGui.gui");
%this.queueExec("./guis/optionsMenu");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/optionsMenu.gui");
%this.queueExec("./guis/pauseMenu");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/pauseMenu.gui");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/remapDlg.gui");
%this.queueExec("./guis/remapConfirmDlg.gui");
%this.queueExec("./guis/profiler");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/profiler.gui");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/netGraphGui.gui");
%this.queueExec("./guis/RecordingsDlg.gui");
%this.queueExec("./guis/guiMusicPlayer");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/guiMusicPlayer.gui");
%this.queueExec("./guis/startupGui");
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/startupGui.gui");
// Load Editor Dialogs
2020-10-05 20:50:45 +00:00
%this.queueExec("./guis/messageBoxDlg.gui");
//Load scripts
%this.queueExec("./scripts/controlsMenu");
%this.queueExec("./scripts/messageBoxes");
%this.queueExec("./scripts/help");
%this.queueExec("./scripts/cursors");
if(isToolBuild())
%this.queueExec("./tools/creator.tscript");
}
function UI::onCreateClientConnection(%this){}
function UI::onDestroyClientConnection(%this){}