mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-28 11:03:49 +00:00
Altered a few of the input images to improve readability of some of the text Standardizes the menuInputButton set usage to just use the raw action names rather than a middleman naming scheme for simplicity and standardization Added comments to menuInputButtons.cs Split out the menuInputButton containers to simplify and stabilize the code on the messageBox dialog Removed old reference to script/gui files not there anymore Simplified the input state check in guiGameListMenuCtrl.cpp Added a check so we don't try exec'ing the selected list item in guiGameListMenuCtrl.cpp if nothing has actually be selected
88 lines
No EOL
2.4 KiB
C#
88 lines
No EOL
2.4 KiB
C#
|
|
// 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 )
|
|
{
|
|
}
|
|
|
|
function UI::onDestroy( %this )
|
|
{
|
|
}
|
|
|
|
function UI::initServer(%this){}
|
|
|
|
function UI::onCreateGameServer(%this){}
|
|
|
|
function UI::onDestroyGameServer(%this){}
|
|
|
|
function UI::initClient(%this)
|
|
{
|
|
//Load UI stuff
|
|
//we need to load this because some of the menu profiles use the sounds here
|
|
//exec("./datablocks/guiSounds.cs");
|
|
|
|
//Profiles
|
|
exec("./scripts/profiles.cs");
|
|
|
|
//Now gui files
|
|
exec("./scripts/menuInputButtons.cs");
|
|
|
|
exec("./guis/mainMenu.cs");
|
|
exec("./guis/mainMenu.gui");
|
|
|
|
exec("./guis/chooseLevelDlg.cs");
|
|
exec("./guis/chooseLevelDlg.gui");
|
|
|
|
exec("./guis/joinServerMenu.cs");
|
|
exec("./guis/joinServerMenu.gui");
|
|
|
|
exec("./guis/loadingGui.gui");
|
|
|
|
exec("./guis/optionsMenu.cs");
|
|
exec("./guis/optionsMenu.gui");
|
|
|
|
exec("./guis/pauseMenu.cs");
|
|
exec("./guis/pauseMenu.gui");
|
|
|
|
exec("./guis/remapDlg.gui");
|
|
exec("./guis/remapConfirmDlg.gui");
|
|
|
|
exec("./guis/profiler.cs");
|
|
exec("./guis/profiler.gui");
|
|
|
|
exec("./guis/netGraphGui.gui");
|
|
exec("./guis/RecordingsDlg.gui");
|
|
|
|
exec("./guis/guiMusicPlayer.cs");
|
|
exec("./guis/guiMusicPlayer.gui");
|
|
|
|
exec("./guis/startupGui.cs");
|
|
exec("./guis/startupGui.gui");
|
|
|
|
// Load Editor Dialogs
|
|
exec("./guis/messageBoxDlg.gui");
|
|
|
|
//Load scripts
|
|
exec("./scripts/controlsMenu.cs");
|
|
exec("./scripts/messageBoxes.cs");
|
|
exec("./scripts/help.cs");
|
|
exec("./scripts/cursors.cs");
|
|
exec("./scripts/utility.cs");
|
|
|
|
loadStartup();
|
|
}
|
|
|
|
function UI::onCreateClientConnection(%this){}
|
|
|
|
function UI::onDestroyClientConnection(%this){} |