mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Parametrize script extension, default to 'tscript'
This commit is contained in:
parent
b8b62292bd
commit
099dd4f1f3
542 changed files with 774 additions and 783 deletions
51
Templates/Modules/inputTest/inputTest.tscript
Normal file
51
Templates/Modules/inputTest/inputTest.tscript
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Module creation functions.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function inputTest::create( %this )
|
||||
{
|
||||
}
|
||||
|
||||
function inputTest::destroy( %this )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function inputTest::initClient( %this )
|
||||
{
|
||||
%this.queueExec("/scripts/customProfiles.tscript");
|
||||
%this.queueExec("/scripts/inputMonitor.tscript");
|
||||
%this.queueExec("/scripts/gui/inputMonitor.gui");
|
||||
%this.queueExec("/scripts/joystickSettings.tscript");
|
||||
%this.queueExec("/scripts/gui/joystickSettings.gui");
|
||||
%this.queueExec("/scripts/menuButtons.tscript");
|
||||
}
|
||||
|
||||
function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
|
||||
{
|
||||
echo("onSDLDeviceConnected(" @ %sdlIndex @ ", \"" @ %deviceName @ "\", \"" @ %deviceType @ "\") - Called");
|
||||
|
||||
// Note: This is called before the device is automatically processed to allow
|
||||
// overrides, so refreshing the gui needs to happen after the device has been opened
|
||||
if (JoystickSettingsDlg.isAwake())
|
||||
JoystickSettingsDlg.schedule(250, "updateDevices");
|
||||
if (InputMonitorDlg.isAwake())
|
||||
InputMonitorDlg.schedule(250, "updateDevicesLine");
|
||||
}
|
||||
|
||||
function onSDLDeviceDisconnected(%sdlIndex)
|
||||
{
|
||||
echo("onSDLDeviceDisconnected(" @ %sdlIndex @ ") - Called");
|
||||
|
||||
if (JoystickSettingsDlg.isAwake())
|
||||
JoystickSettingsDlg.schedule(250, "updateDevices");
|
||||
if (InputMonitorDlg.isAwake())
|
||||
InputMonitorDlg.schedule(250, "updateDevicesLine");
|
||||
}
|
||||
|
||||
function listAllGCMappings()
|
||||
{ // Lists all game controller device mappings that are currently installed
|
||||
%numMappings = SDLInputManager::GameControllerNumMappings();
|
||||
for (%i = 0; %i < %numMappings; %i++)
|
||||
echo(SDLInputManager::GameControllerMappingForIndex(%i));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue