Unit CastleJoysticks
Variables
Description
Cross-platform joystick and gamepad handling.
Uses
- Generics.Collections
- Classes
- CastleVectors
- CastleUtils
Overview
Classes, Interfaces, Objects and Records
Name | Description |
---|---|
Record TJoyInfo |
Joystick information. |
Record TJoyState |
Joystick state. |
Class TJoystick |
Properties of a given joystick, use by accessing Joysticks[Index]. |
Class TJoysticks |
TJoysticks is a class for joysticks and gamepads management |
Functions and Procedures
procedure EnableJoysticks; deprecated 'use Joysticks.Initialize'; |
function Joysticks: TJoysticks; |
Types
PJoyInfo = ˆTJoyInfo; |
PJoyState = ˆTJoyState; |
PJoy = TJoystick deprecated 'use TJoystick'; |
TJoystickList = specialize TObjectList<TJoystick>; |
TOnJoyAxisMove = procedure(const Joy: TJoystick; const Axis: Byte; const Value: Single) of object; |
TOnJoyButtonEvent = procedure(const Joy: TJoystick; const Button: Byte) of object; |
Constants
JOY_HAS_Z = $000001; |
JOY_HAS_R = $000002; |
JOY_HAS_U = $000004; |
JOY_HAS_V = $000008; |
JOY_HAS_POV = $000010; |
JOY_AXIS_X = 0; |
JOY_AXIS_Y = 1; |
JOY_AXIS_Z = 2; |
JOY_AXIS_R = 3; |
JOY_AXIS_U = 4; |
JOY_AXIS_V = 5; |
JOY_POVX = 6; |
JOY_POVY = 7; |
Description
Functions and Procedures
procedure EnableJoysticks; deprecated 'use Joysticks.Initialize'; |
Warning: this symbol is deprecated: use Joysticks.Initialize Detect connected joysticks. |
function Joysticks: TJoysticks; |
Global joystick manager object. Singleton, automatically created when being accessed. Remember to call TJoysticks.Initialize, this is necessary on some platforms to detect |
Types
PJoyInfo = ˆTJoyInfo; |
PJoyState = ˆTJoyState; |
PJoy = TJoystick deprecated 'use TJoystick'; |
Warning: this symbol is deprecated: use TJoystick |
TJoystickList = specialize TObjectList<TJoystick>; |
TOnJoyAxisMove = procedure(const Joy: TJoystick; const Axis: Byte; const Value: Single) of object; |
Joystick axis move event. |
TOnJoyButtonEvent = procedure(const Joy: TJoystick; const Button: Byte) of object; |
Joystick button action event. Used on button press/up/down. |
Constants
JOY_HAS_Z = $000001; |
TODO: Deprecate these constants at some point, in favor of simpler joystick API like TJoystick.Axis. |
JOY_HAS_R = $000002; |
JOY_HAS_U = $000004; |
JOY_HAS_V = $000008; |
JOY_HAS_POV = $000010; |
JOY_AXIS_X = 0; |
JOY_AXIS_Y = 1; |
JOY_AXIS_Z = 2; |
JOY_AXIS_R = 3; |
JOY_AXIS_U = 4; |
JOY_AXIS_V = 5; |
JOY_POVX = 6; |
JOY_POVY = 7; |
Generated by PasDoc 0.16.0.