diff --git a/Templates/Modules/inputTest/inputTest.tscript b/Templates/Modules/inputTest/inputTest.tscript index 7dad50618..07f27fc9f 100644 --- a/Templates/Modules/inputTest/inputTest.tscript +++ b/Templates/Modules/inputTest/inputTest.tscript @@ -4,6 +4,11 @@ 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 ) @@ -13,12 +18,12 @@ function inputTest::destroy( %this ) function inputTest::initClient( %this ) { - %this.queueExec("/scripts/customProfiles." @ $TorqueScriptFileExtension); - %this.queueExec("/scripts/inputMonitor." @ $TorqueScriptFileExtension); - %this.queueExec("/scripts/gui/inputMonitor.gui"); - %this.queueExec("/scripts/joystickSettings." @ $TorqueScriptFileExtension); - %this.queueExec("/scripts/gui/joystickSettings.gui"); - %this.queueExec("/scripts/menuButtons." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/customProfiles." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/inputMonitor." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/gui/inputMonitor.gui"); + %this.queueExec("./scripts/joystickSettings." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/gui/joystickSettings.gui"); + %this.queueExec("./scripts/menuButtons." @ $TorqueScriptFileExtension); } function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType) diff --git a/Templates/Modules/inputTest/scripts/gui/inputMonitor.gui b/Templates/Modules/inputTest/scripts/gui/inputMonitor.gui index 67708cf2e..c695016af 100644 --- a/Templates/Modules/inputTest/scripts/gui/inputMonitor.gui +++ b/Templates/Modules/inputTest/scripts/gui/inputMonitor.gui @@ -55,7 +55,7 @@ $guiContent = new GuiControl(InputMonitorDlg) { canSaveDynamicFields = "0"; }; new GuiChunkedBitmapCtrl() { - bitmap = "data/ui/art/hudfill.png"; + bitmap = "data/ui/images/hudfill.png"; useVariable = "0"; tile = "0"; position = "0 0"; diff --git a/Templates/Modules/inputTest/scripts/menuButtons.tscript b/Templates/Modules/inputTest/scripts/menuButtons.tscript index 471676a07..8f97d2262 100644 --- a/Templates/Modules/inputTest/scripts/menuButtons.tscript +++ b/Templates/Modules/inputTest/scripts/menuButtons.tscript @@ -2,6 +2,8 @@ // Add buttons to the MainMenu after all other scripts have been exec'ed. //----------------------------------------------------------------------------- +function inputTest::addMenuButton( %this ) +{ if (isObject(MainMenuGui)) { %testBtn = new GuiButtonCtrl() { @@ -56,4 +58,8 @@ } MMTestContainer.add(%testBtn); - } \ No newline at end of file + } +} + +if (inputTest.addToMainMenu) + inputTest.addMenuButton(); \ No newline at end of file