mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #272 from OTHGMars/InputTestInit
inputTest Module Initialization
This commit is contained in:
commit
b727d1d962
2 changed files with 65 additions and 61 deletions
|
|
@ -13,67 +13,12 @@ function inputTest::destroy( %this )
|
||||||
|
|
||||||
function inputTest::initClient( %this )
|
function inputTest::initClient( %this )
|
||||||
{
|
{
|
||||||
exec("./scripts/customProfiles.cs");
|
%this.queueExec("/scripts/customProfiles.cs");
|
||||||
exec("./scripts/inputMonitor.cs");
|
%this.queueExec("/scripts/inputMonitor.cs");
|
||||||
exec("./scripts/gui/inputMonitor.gui");
|
%this.queueExec("/scripts/gui/inputMonitor.gui");
|
||||||
exec("./scripts/joystickSettings.cs");
|
%this.queueExec("/scripts/joystickSettings.cs");
|
||||||
exec("./scripts/gui/joystickSettings.gui");
|
%this.queueExec("/scripts/gui/joystickSettings.gui");
|
||||||
|
%this.queueExec("/scripts/menuButtons.cs");
|
||||||
if (isObject(MainMenuGui))
|
|
||||||
{
|
|
||||||
%testBtn = new GuiButtonCtrl() {
|
|
||||||
text = "Input Event Monitor";
|
|
||||||
groupNum = "-1";
|
|
||||||
buttonType = "PushButton";
|
|
||||||
useMouseEvents = "0";
|
|
||||||
position = "0 0";
|
|
||||||
extent = "200 40";
|
|
||||||
minExtent = "8 8";
|
|
||||||
horizSizing = "right";
|
|
||||||
vertSizing = "bottom";
|
|
||||||
profile = "GuiBlankMenuButtonProfile";
|
|
||||||
visible = "1";
|
|
||||||
active = "1";
|
|
||||||
command = "Canvas.pushDialog(InputMonitorDlg);";
|
|
||||||
tooltipProfile = "GuiToolTipProfile";
|
|
||||||
isContainer = "0";
|
|
||||||
canSave = "0";
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!isObject(MMTestContainer))
|
|
||||||
{
|
|
||||||
new GuiDynamicCtrlArrayControl(MMTestContainer) {
|
|
||||||
colCount = "0";
|
|
||||||
colSize = "200";
|
|
||||||
rowCount = "0";
|
|
||||||
rowSize = "40";
|
|
||||||
rowSpacing = "2";
|
|
||||||
colSpacing = "0";
|
|
||||||
frozen = "0";
|
|
||||||
autoCellSize = "0";
|
|
||||||
fillRowFirst = "1";
|
|
||||||
dynamicSize = "1";
|
|
||||||
padding = "0 0 0 0";
|
|
||||||
position = "0 0";
|
|
||||||
extent = "200 40";
|
|
||||||
minExtent = "8 2";
|
|
||||||
horizSizing = "right";
|
|
||||||
vertSizing = "bottom";
|
|
||||||
profile = "GuiDefaultProfile";
|
|
||||||
visible = "1";
|
|
||||||
active = "1";
|
|
||||||
tooltipProfile = "GuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
isContainer = "1";
|
|
||||||
canSave = "0";
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
};
|
|
||||||
MainMenuGui.add(MMTestContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
MMTestContainer.add(%testBtn);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
|
function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
|
||||||
|
|
|
||||||
59
Templates/Modules/inputTest/scripts/menuButtons.cs
Normal file
59
Templates/Modules/inputTest/scripts/menuButtons.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Add buttons to the MainMenu after all other scripts have been exec'ed.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if (isObject(MainMenuGui))
|
||||||
|
{
|
||||||
|
%testBtn = new GuiButtonCtrl() {
|
||||||
|
text = "Input Event Monitor";
|
||||||
|
groupNum = "-1";
|
||||||
|
buttonType = "PushButton";
|
||||||
|
useMouseEvents = "0";
|
||||||
|
position = "0 0";
|
||||||
|
extent = "200 40";
|
||||||
|
minExtent = "8 8";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "GuiBlankMenuButtonProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
command = "Canvas.pushDialog(InputMonitorDlg);";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "0";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!isObject(MMTestContainer))
|
||||||
|
{
|
||||||
|
new GuiDynamicCtrlArrayControl(MMTestContainer) {
|
||||||
|
colCount = "0";
|
||||||
|
colSize = "200";
|
||||||
|
rowCount = "0";
|
||||||
|
rowSize = "40";
|
||||||
|
rowSpacing = "2";
|
||||||
|
colSpacing = "0";
|
||||||
|
frozen = "0";
|
||||||
|
autoCellSize = "0";
|
||||||
|
fillRowFirst = "1";
|
||||||
|
dynamicSize = "1";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
position = "0 0";
|
||||||
|
extent = "200 40";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "GuiDefaultProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "0";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
MainMenuGui.add(MMTestContainer);
|
||||||
|
}
|
||||||
|
|
||||||
|
MMTestContainer.add(%testBtn);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue