mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
inputTest Module Update
Updates the input event monitor to work with the current BaseGame template.
This commit is contained in:
parent
0f89373782
commit
58a79e0105
3 changed files with 19 additions and 8 deletions
|
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
function inputTest::create( %this )
|
function inputTest::create( %this )
|
||||||
{
|
{
|
||||||
|
// If addToMainMenu is true, a button to display the input monitor will be
|
||||||
|
// added to the MainMenu gui. If false, you will need to call
|
||||||
|
// "$GameCanvas.pushDialog(InputMonitorDlg);" from the console or add a
|
||||||
|
// shortcut somewhere else to access the Input Event Monitor.
|
||||||
|
%this.addToMainMenu = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function inputTest::destroy( %this )
|
function inputTest::destroy( %this )
|
||||||
|
|
@ -13,12 +18,12 @@ function inputTest::destroy( %this )
|
||||||
|
|
||||||
function inputTest::initClient( %this )
|
function inputTest::initClient( %this )
|
||||||
{
|
{
|
||||||
%this.queueExec("/scripts/customProfiles." @ $TorqueScriptFileExtension);
|
%this.queueExec("./scripts/customProfiles." @ $TorqueScriptFileExtension);
|
||||||
%this.queueExec("/scripts/inputMonitor." @ $TorqueScriptFileExtension);
|
%this.queueExec("./scripts/inputMonitor." @ $TorqueScriptFileExtension);
|
||||||
%this.queueExec("/scripts/gui/inputMonitor.gui");
|
%this.queueExec("./scripts/gui/inputMonitor.gui");
|
||||||
%this.queueExec("/scripts/joystickSettings." @ $TorqueScriptFileExtension);
|
%this.queueExec("./scripts/joystickSettings." @ $TorqueScriptFileExtension);
|
||||||
%this.queueExec("/scripts/gui/joystickSettings.gui");
|
%this.queueExec("./scripts/gui/joystickSettings.gui");
|
||||||
%this.queueExec("/scripts/menuButtons." @ $TorqueScriptFileExtension);
|
%this.queueExec("./scripts/menuButtons." @ $TorqueScriptFileExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
|
function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ $guiContent = new GuiControl(InputMonitorDlg) {
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
};
|
};
|
||||||
new GuiChunkedBitmapCtrl() {
|
new GuiChunkedBitmapCtrl() {
|
||||||
bitmap = "data/ui/art/hudfill.png";
|
bitmap = "data/ui/images/hudfill.png";
|
||||||
useVariable = "0";
|
useVariable = "0";
|
||||||
tile = "0";
|
tile = "0";
|
||||||
position = "0 0";
|
position = "0 0";
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
// Add buttons to the MainMenu after all other scripts have been exec'ed.
|
// Add buttons to the MainMenu after all other scripts have been exec'ed.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function inputTest::addMenuButton( %this )
|
||||||
|
{
|
||||||
if (isObject(MainMenuGui))
|
if (isObject(MainMenuGui))
|
||||||
{
|
{
|
||||||
%testBtn = new GuiButtonCtrl() {
|
%testBtn = new GuiButtonCtrl() {
|
||||||
|
|
@ -56,4 +58,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
MMTestContainer.add(%testBtn);
|
MMTestContainer.add(%testBtn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inputTest.addToMainMenu)
|
||||||
|
inputTest.addMenuButton();
|
||||||
Loading…
Add table
Add a link
Reference in a new issue