mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'Preview4_0' of https://github.com/TorqueGameEngines/Torque3D into alpha40/playgui_onwake_callback
This commit is contained in:
commit
863da35ca0
934 changed files with 77224 additions and 54048 deletions
|
|
@ -4,7 +4,7 @@
|
|||
ModuleId="ExampleModule"
|
||||
VersionId="1"
|
||||
Group="Game"
|
||||
scriptFile="ExampleModule.cs"
|
||||
scriptFile="ExampleModule"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy">
|
||||
<DeclaredAssets
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function ExampleModule::onDestroy(%this)
|
|||
//This is called when the server part of the application is initially created. Torque3D
|
||||
//assumes, even in a single player context, that there is ultimately a 'server' and a 'client'
|
||||
//So during initial launch and startup of the engine, the server side is initialized in
|
||||
//core/clientServer/scripts/server/server.cs - in the initServer() function where this is called.
|
||||
//core/clientServer/scripts/server/server.tscript - in the initServer() function where this is called.
|
||||
//This is called on all modules that have this function defined. This is important for
|
||||
//any persistant parts of the server that always need to run such as gameplay scripts
|
||||
//
|
||||
|
|
@ -29,15 +29,15 @@ function ExampleModule::onDestroy(%this)
|
|||
//ExampleGameMode::onMissionReset
|
||||
//Are called during the startup, shut down, and resetting of any and all active gamemodes, as informed by the loaded scenes
|
||||
//when the game server is processed.
|
||||
//These callbacks are activated in core/clientServer/scripts/server/levelLoad.cs
|
||||
//These callbacks are activated in core/clientServer/scripts/server/levelLoad.tscript
|
||||
function ExampleModule::initServer(%this)
|
||||
{
|
||||
//This script contains our ExampleGameMode logic
|
||||
%this.queueExec("./scripts/ExampleGamemodeScript.cs");
|
||||
%this.queueExec("./scripts/ExampleGamemodeScript." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
//This is called when a game session server is actually created so the game may be played. It's called
|
||||
//from core/clientServer/scripts/server/server.cs - in the createServer() function, which is called when
|
||||
//from core/clientServer/scripts/server/server.tscript - in the createServer() function, which is called when
|
||||
//A game session is actually launched, and the server is generated so game clients can connect to it.
|
||||
//This is utilized to set up common things that need to be set up each time the game session server is
|
||||
//created, such as common variables, datablocks to be transmitted to the client, etc.
|
||||
|
|
@ -50,11 +50,11 @@ function ExampleModule::onCreateGameServer(%this)
|
|||
//onServerCreated(), it loads the datablocks via this array, and when when the server goes
|
||||
//to pass data to the client, it iterates over this list and processes it, ensuring all datablocks
|
||||
//are the most up to date possible for transmission to the connecting client
|
||||
//%this.registerDatablock("./datablocks/ExampleDatablock.cs");
|
||||
//%this.registerDatablock("./datablocks/ExampleDatablock." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
//This is called when a game session server is destroyed, when the game shuts down. It's called from
|
||||
//core/clientServer/scripts/server/server.cs - in the destroyServer() function, which just cleans up anything
|
||||
//core/clientServer/scripts/server/server.tscript - in the destroyServer() function, which just cleans up anything
|
||||
//The module may have set up as part of the game server being created.
|
||||
function ExampleModule::onDestroyGameServer(%this)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ function ExampleModule::onDestroyGameServer(%this)
|
|||
|
||||
//Similar to initServer, this is called during the initial launch of the application and the client component
|
||||
//is set up. The difference is that the client may not actually be created, such as in the case for dedicated servers
|
||||
//Where no UI or gameplay interface is required. It's called from core/clientServer/scripts/client/client.cs -
|
||||
//Where no UI or gameplay interface is required. It's called from core/clientServer/scripts/client/client.tscript -
|
||||
//in the initClient() function. It sets up common elements that the client will always need, such as scripts, GUIs
|
||||
//and the like
|
||||
function ExampleModule::initClient(%this)
|
||||
|
|
@ -74,17 +74,17 @@ function ExampleModule::initClient(%this)
|
|||
|
||||
//client scripts
|
||||
//Here, we exec out keybind scripts so the player is able to move when they get into a game
|
||||
%this.queueExec("./scripts/default.keybinds.cs");
|
||||
%this.queueExec("./scripts/default.keybinds." @ $TorqueScriptFileExtension);
|
||||
|
||||
%prefPath = getPrefpath();
|
||||
if(isFile(%prefPath @ "/keybinds.cs"))
|
||||
exec(%prefPath @ "/keybinds.cs");
|
||||
if(isFile(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension))
|
||||
exec(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension);
|
||||
|
||||
%this.queueExec("./scripts/inputCommands.cs");
|
||||
%this.queueExec("./scripts/inputCommands." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
//This is called when a game session client successfuly connects to a game server.
|
||||
//It's called from core/clientServer/scripts/client/connectionToServer.cs - in the GameConnection::onConnectionAccepted() function
|
||||
//It's called from core/clientServer/scripts/client/connectionToServer.tscript - in the GameConnection::onConnectionAccepted() function
|
||||
//It's used for any client-side specific game session stuff that the client needs to load or pass to the server, such as profile data
|
||||
//account progress, preferences, etc.
|
||||
//
|
||||
|
|
@ -96,7 +96,7 @@ function ExampleModule::onCreateClientConnection(%this)
|
|||
}
|
||||
|
||||
//This is called when a client game session disconnects from a game server
|
||||
//It's called from core/clientServer/scripts/client/connectionToServer.cs - in the disconnectedCleanup() function
|
||||
//It's called from core/clientServer/scripts/client/connectionToServer.tscript - in the disconnectedCleanup() function
|
||||
//It's used to clean up and potentially write out any client-side stuff that needs housekeeping when disconnecting for any reason.
|
||||
//It will be called if the connection is manually terminated, or lost due to any sort of connection issue.
|
||||
//
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
//ExampleGameMode::onMissionReset
|
||||
//ExampleGameMode::onMissionEnd
|
||||
//Are the primary hooks for the server to start, restart and end any active gamemodes
|
||||
//onMissionStart, for example is called from core/clientServer/scripts/server/levelLoad.cs
|
||||
//onMissionStart, for example is called from core/clientServer/scripts/server/levelLoad.tscript
|
||||
//It's called once the server has successfully loaded the level, and has parsed
|
||||
//through any active scenes to get GameModeNames defined by them. It then iterates
|
||||
//over them and calls these callbacks to envoke gamemode behaviors. This allows multiple
|
||||
|
|
@ -128,7 +128,7 @@ function ExampleGameMode::onClientConnect(%this, %client)
|
|||
|
||||
//This is called when a client enters the game server. It's used to spawn a player object
|
||||
//set up any client-specific properties such as saved configs, values, their name, etc
|
||||
//These callbacks are activated in core/clientServer/scripts/server/levelDownload.cs
|
||||
//These callbacks are activated in core/clientServer/scripts/server/levelDownload.tscript
|
||||
function ExampleGameMode::onClientEnterGame(%this, %client)
|
||||
{
|
||||
//Set the player name based on the client's connection data
|
||||
|
|
@ -139,7 +139,7 @@ function ExampleGameMode::onClientEnterGame(%this, %client)
|
|||
|
||||
//This is called when the player leaves the game server. It's used to clean up anything that
|
||||
//was spawned or setup for the client when it connected, in onClientEnterGame
|
||||
//These callbacks are activated in core/clientServer/scripts/server/levelDownload.cs
|
||||
//These callbacks are activated in core/clientServer/scripts/server/levelDownload.tscript
|
||||
function ExampleGameMode::onClientLeaveGame(%this, %client)
|
||||
{
|
||||
// Cleanup the camera
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="DetailBlue"
|
||||
scriptFile="@assetFile=DetailBlue.cs"
|
||||
scriptFile="@assetFile=DetailBlue.tscript"
|
||||
materialDefinitionName="DetailBlue"
|
||||
imageMap0="@Asset=Prototyping:DetailBlue_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/DetailBlue.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="FloorGray"
|
||||
scriptFile="@assetFile=FloorGray.cs"
|
||||
scriptFile="@assetFile=FloorGray.tscript"
|
||||
materialDefinitionName="FloorGray"
|
||||
imageMap0="@Asset=Prototyping:FloorGray_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/FloorGray.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="InteractiveRed"
|
||||
scriptFile="@assetFile=InteractiveRed.cs"
|
||||
scriptFile="@assetFile=InteractiveRed.tscript"
|
||||
materialDefinitionName="InteractiveRed"
|
||||
imageMap0="@Asset=Prototyping:InteractiveRed_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/InteractiveRed.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="NatureBrown"
|
||||
scriptFile="@assetFile=NatureBrown.cs"
|
||||
scriptFile="@assetFile=NatureBrown.tscript"
|
||||
materialDefinitionName="NatureBrown"
|
||||
imageMap0="@Asset=Prototyping:NatureBrown_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/NatureBrown.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="NatureGreen"
|
||||
scriptFile="@assetFile=NatureGreen.cs"
|
||||
scriptFile="@assetFile=NatureGreen.tscript"
|
||||
materialDefinitionName="NatureGreen"
|
||||
imageMap0="@Asset=Prototyping:NatureGreen_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/NatureGreen.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="NullPink"
|
||||
scriptFile="@assetFile=NullPink.cs"
|
||||
scriptFile="@assetFile=NullPink.tscript"
|
||||
materialDefinitionName="NullPink"
|
||||
imageMap0="@Asset=Prototyping:NullPink_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/NullPink.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="TrimYellow"
|
||||
scriptFile="@assetFile=TrimYellow.cs"
|
||||
scriptFile="@assetFile=TrimYellow.tscript"
|
||||
materialDefinitionName="TrimYellow"
|
||||
imageMap0="@Asset=Prototyping:TrimYellow_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/TrimYellow.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="WallOrange"
|
||||
scriptFile="@assetFile=WallOrange.cs"
|
||||
scriptFile="@assetFile=WallOrange.tscript"
|
||||
materialDefinitionName="WallOrange"
|
||||
imageMap0="@Asset=Prototyping:WallOrange_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/WallOrange.png" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="WaterBlue"
|
||||
scriptFile="@assetFile=WaterBlue.cs"
|
||||
scriptFile="@assetFile=WaterBlue.tscript"
|
||||
materialDefinitionName="WaterBlue"
|
||||
imageMap0="@Asset=Prototyping:WaterBlue_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/art/Blockout/WaterBlue.png" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
ModuleId="Prototyping"
|
||||
VersionId="1"
|
||||
Group="Game"
|
||||
scriptFile="Prototyping.cs"
|
||||
scriptFile="Prototyping.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy">
|
||||
<DeclaredAssets
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="kork_chan"
|
||||
scriptFile="@assetFile=kork_chan.cs"
|
||||
scriptFile="@assetFile=kork_chan.tscript"
|
||||
materialDefinitionName="kork_chan"
|
||||
imageMap0="@Asset=Prototyping:kork_chan_ALBEDO"
|
||||
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="gameUI"
|
||||
VersionId="1"
|
||||
Description="Basic Game GUI."
|
||||
ScriptFile="gameUI.cs"
|
||||
ScriptFile="gameUI.tscript"
|
||||
CreateFunction="create"
|
||||
DestroyFunction="destroy"
|
||||
Group="Game"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ function gameUI::initClient(%this)
|
|||
{
|
||||
//guis
|
||||
%this.queueExec("./GUIs/playGui.gui");
|
||||
%this.queueExec("./GUIs/playGui.cs");
|
||||
%this.queueExec("./GUIs/playGui." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function gameUI::onCreateClientConnection(%this){}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="UI"
|
||||
VersionId="1"
|
||||
Description="Module that implements the menus for the game."
|
||||
ScriptFile="UI.cs"
|
||||
ScriptFile="UI"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Game">
|
||||
|
|
|
|||
|
|
@ -30,55 +30,55 @@ function UI::initClient(%this)
|
|||
{
|
||||
//Load UI stuff
|
||||
//we need to load this because some of the menu profiles use the sounds here
|
||||
//%this.queueExec("./datablocks/guiSounds.cs");
|
||||
//%this.queueExec("./datablocks/guiSounds." @ $TorqueScriptFileExtension);
|
||||
|
||||
//Profiles
|
||||
%this.queueExec("./scripts/profiles.cs");
|
||||
%this.queueExec("./scripts/profiles." @ $TorqueScriptFileExtension);
|
||||
|
||||
//Now gui files
|
||||
%this.queueExec("./scripts/menuInputButtons.cs");
|
||||
%this.queueExec("./scripts/menuInputButtons." @ $TorqueScriptFileExtension);
|
||||
|
||||
%this.queueExec("./guis/mainMenu.cs");
|
||||
%this.queueExec("./guis/mainMenu." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/mainMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/chooseLevelDlg.cs");
|
||||
%this.queueExec("./guis/chooseLevelDlg." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/chooseLevelDlg.gui");
|
||||
|
||||
%this.queueExec("./guis/joinServerMenu.cs");
|
||||
%this.queueExec("./guis/joinServerMenu." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/joinServerMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/loadingGui.gui");
|
||||
|
||||
%this.queueExec("./guis/optionsMenu.cs");
|
||||
%this.queueExec("./guis/optionsMenu." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/optionsMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/pauseMenu.cs");
|
||||
%this.queueExec("./guis/pauseMenu." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/pauseMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/remapDlg.gui");
|
||||
%this.queueExec("./guis/remapConfirmDlg.gui");
|
||||
|
||||
%this.queueExec("./guis/profiler.cs");
|
||||
%this.queueExec("./guis/profiler." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/profiler.gui");
|
||||
|
||||
%this.queueExec("./guis/netGraphGui.gui");
|
||||
%this.queueExec("./guis/RecordingsDlg.gui");
|
||||
|
||||
%this.queueExec("./guis/guiMusicPlayer.cs");
|
||||
%this.queueExec("./guis/guiMusicPlayer." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/guiMusicPlayer.gui");
|
||||
|
||||
%this.queueExec("./guis/startupGui.cs");
|
||||
%this.queueExec("./guis/startupGui." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./guis/startupGui.gui");
|
||||
|
||||
// Load Editor Dialogs
|
||||
%this.queueExec("./guis/messageBoxDlg.gui");
|
||||
|
||||
//Load scripts
|
||||
%this.queueExec("./scripts/controlsMenu.cs");
|
||||
%this.queueExec("./scripts/messageBoxes.cs");
|
||||
%this.queueExec("./scripts/help.cs");
|
||||
%this.queueExec("./scripts/cursors.cs");
|
||||
%this.queueExec("./scripts/utility.cs");
|
||||
%this.queueExec("./scripts/controlsMenu." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./scripts/messageBoxes." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./scripts/help." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./scripts/cursors." @ $TorqueScriptFileExtension);
|
||||
%this.queueExec("./scripts/utility." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function UI::onCreateClientConnection(%this){}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
exec( "tools/gui/profiles.ed.cs" );
|
||||
exec( "tools/gui/profiles.ed.tscript" );
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ function OptionsMenu::apply(%this)
|
|||
if(%actionMap == GlobalActionMap.getId())
|
||||
continue;
|
||||
|
||||
%actionMap.save( %prefPath @ "/keybinds.cs", %append );
|
||||
%actionMap.save( %prefPath @ "/keybinds." @ $TorqueScriptFileExtension, %append );
|
||||
|
||||
if(%append != true)
|
||||
%append = true;
|
||||
|
|
@ -107,7 +107,7 @@ function OptionsMenu::apply(%this)
|
|||
}
|
||||
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
}
|
||||
|
||||
function OptionsMenu::resetToDefaults(%this)
|
||||
|
|
@ -290,7 +290,7 @@ function OptionsMenu::applyDisplaySettings(%this)
|
|||
|
||||
echo("Exporting client prefs");
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
}
|
||||
|
||||
function OptionsMenu::populateGraphicsSettingsList(%this)
|
||||
|
|
@ -386,7 +386,7 @@ function OptionsMenu::applyGraphicsSettings(%this)
|
|||
|
||||
echo("Exporting client prefs");
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
}
|
||||
|
||||
function updateDisplaySettings()
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
|
|
@ -114,6 +114,9 @@ function buildFullMapString( %index, %actionMap, %deviceType )
|
|||
%device = getField( %temp, %i + 0 );
|
||||
%object = getField( %temp, %i + 1 );
|
||||
|
||||
if (startsWith(%device,"mouse"))
|
||||
%deviceType = "mouse";
|
||||
|
||||
if(%deviceType !$= "" && !startsWith(%device, %deviceType))
|
||||
continue;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue