Torque 3D - Script Manual: GuiCursor Class Reference

TorqueScript

Main   Class List   Namespace List   Online

GuiCursor Class Reference
[Core Controls]

Acts as a skin for the cursor, where each GuiCursor object can have its own look and click-zone. More...

Inheritance diagram for GuiCursor:

List of all members.

Public Attributes

filename bitmapName
 File name of the bitmap for the cursor.
Point2I hotSpot
 The location of the cursor's hot spot (which pixel carries the click).
Point2F renderOffset
 Offset of the bitmap, where 0 signifies left edge of the bitmap, 1, the right. Similarly for the Y-component.

Detailed Description

Acts as a skin for the cursor, where each GuiCursor object can have its own look and click-zone.

GuiCursors act as skins for the cursor in the game, where each individual GuiCursor can have its own defined imagemap, click zone and render offset. This allows a game to easily support a wide range of cursors. The active cursor can de changed for each Canvas using canvasObj.setCursor(GuiCursor);.

Example:
new GuiCursor(DefaultCursor)
{
   hotSpot = "1 1";
   renderOffset = "0 0";
   bitmapName = "~/art/gui/images/defaultCursor";
};
See also:
GuiCanvas

Member Data Documentation

File name of the bitmap for the cursor.

The location of the cursor's hot spot (which pixel carries the click).

Offset of the bitmap, where 0 signifies left edge of the bitmap, 1, the right. Similarly for the Y-component.



Copyright © GarageGames, LLC. All Rights Reserved.