Torque 3D - Script Manual: GuiInputCtrl Class Reference

TorqueScript

Main   Class List   Namespace List   Online

GuiInputCtrl Class Reference
[Utility Controls]

A control that locks the mouse and reports all keyboard input events to script. More...

Inheritance diagram for GuiInputCtrl:

List of all members.

Public Member Functions

Callbacks

void onInputEvent (string device, string action, bool state)
 Callback that occurs when an input is triggered on this control.

Detailed Description

A control that locks the mouse and reports all keyboard input events to script.

This is useful for implementing custom keyboard handling code, and most commonly used in Torque for a menu that allows a user to remap their in-game controls

Example:
new GuiInputCtrl(OptRemapInputCtrl)
{
   lockMouse = "0";
   position = "0 0";
   extent = "64 64";
   minExtent = "8 8";
   horizSizing = "center";
   vertSizing = "bottom";
   profile = "GuiInputCtrlProfile";
   visible = "1";
   active = "1";
   tooltipProfile = "GuiToolTipProfile";
   hovertime = "1000";
   isContainer = "0";
   canSave = "1";
   canSaveDynamicFields = "0";
};
See also:
GuiMouseEventCtrl

Member Function Documentation

void GuiInputCtrl::onInputEvent ( string  device,
string  action,
bool  state 
)

Callback that occurs when an input is triggered on this control.

Parameters:
device The device type triggering the input, such as keyboard, mouse, etc
action The actual event occuring, such as a key or button
state True if the action is being pressed, false if it is being release


Copyright © GarageGames, LLC. All Rights Reserved.