Torque 3D - Script Manual: Game Controls

TorqueScript

Main   Class List   Namespace List   Online

Game Controls
[GUI]

GUI controls dedicated to game play systems, such as heads up displays. More...

Classes

class  GuiClockHud
 Basic HUD clock. Displays the current simulation time offset from some base. More...
class  GuiCrossHairHud
 Basic cross hair hud. Reacts to state of control object. Also displays health bar for named objects under the cross hair. More...
class  GuiGameListMenuCtrl
 A base class for cross platform menu controls that are gamepad friendly. More...
class  GuiGameListMenuProfile
 A GuiControlProfile with additional fields specific to GuiGameListMenuCtrl. More...
class  GuiGameListOptionsCtrl
 A control for showing pages of options that are gamepad friendly. More...
class  GuiGameListOptionsProfile
 A GuiControlProfile with additional fields specific to GuiGameListOptionsCtrl. More...
class  GuiHealthBarHud
 A basic health bar. Shows the damage value of the current PlayerObjectType control object. More...
class  GuiHealthTextHud
 Shows the health or energy value of the current PlayerObjectType control object. More...
class  GuiShapeNameHud
 Displays name and damage of ShapeBase objects in its bounds. Must be a child of a GuiTSCtrl and a server connection must be present. More...

Functions

void snapToggle ()
 Prevents mouse movement from being processed.

Detailed Description

GUI controls dedicated to game play systems, such as heads up displays.


Function Documentation

void snapToggle (  ) 

Prevents mouse movement from being processed.

In the source, whenever a mouse move event occurs GameTSCtrl::onMouseMove() is called. Whenever snapToggle() is called, it will flag a variable that can prevent this from happening: gSnapLine. This variable is not exposed to script, so you need to call this function to trigger it.

Example:
// Snapping is off by default, so we will toggle
// it on first:
PlayGui.snapToggle();

// Mouse movement should be disabled
// Let's turn it back on
PlayGui.snapToggle();


Copyright © GarageGames, LLC. All Rights Reserved.