Class TJoysticks
Unit
CastleJoysticks
Declaration
type TJoysticks = class(TObject)
Description
TJoysticks
is a class for joysticks and gamepads management
Hierarchy
Overview
Methods
 |
procedure DoChange; |
 |
constructor Create; |
 |
destructor Destroy; override; |
 |
function GetInfo( JoyID : Byte ) : PJoyInfo; |
 |
function AxisPos( JoyID, Axis : Byte ): Single; |
 |
function Down( JoyID, Button : Byte ): Boolean; |
 |
function Up( JoyID, Button : Byte ): Boolean; |
 |
function Press( JoyID, Button : Byte ): Boolean; |
 |
procedure ClearState; |
 |
function GetJoy(const JoyID: Integer): TJoystick; deprecated 'use Joysticks[xxx] instead of Joysticks.GetJoy(xxx)'; |
 |
function JoyCount: Integer; deprecated 'use Count'; |
 |
function Count: Integer; |
 |
procedure Initialize; |
Properties
Description
Methods
 |
constructor Create; |
|
 |
destructor Destroy; override; |
|
 |
function GetInfo( JoyID : Byte ) : PJoyInfo; |
|
 |
function AxisPos( JoyID, Axis : Byte ): Single; |
|
 |
function Down( JoyID, Button : Byte ): Boolean; |
|
 |
function Up( JoyID, Button : Byte ): Boolean; |
|
 |
function Press( JoyID, Button : Byte ): Boolean; |
|
 |
procedure ClearState; |
|
 |
function GetJoy(const JoyID: Integer): TJoystick; deprecated 'use Joysticks[xxx] instead of Joysticks.GetJoy(xxx)'; |
Warning: this symbol is deprecated: use Joysticks[xxx] instead of Joysticks.GetJoy(xxx) |
 |
function JoyCount: Integer; deprecated 'use Count'; |
Warning: this symbol is deprecated: use Count |
 |
function Count: Integer; |
|
 |
procedure Initialize; |
Detect connected joysticks. On some platforms, you need to call this to search for connected joysticks, otherwise you will always have zero joysticks. Calling this again is allowed, it searches for connected joysticks again.
|
Properties
 |
property OnAxisMove: TOnJoyAxisMove read FOnAxisMove write FOnAxisMove; |
|
 |
property Items[constIndex:Integer]: TJoystick read GetItems; |
|
 |
property Initialized: Boolean read FInitialized; |
|
 |
property OnChange: TNotifyEvent read FOnChange write FOnChange; |
Called after TJoystick instances on the list change (some are added, destroyed). In case of some backends, this is only called at the end of Initialize, but it may be called in other cases (e.g. "explicit" joystick backend, used by Nintendo Switch, may call this at any moment).
|
 |
property OnDisconnect: TSimpleNotifyEvent read FOnDisconnect write FOnDisconnect; |
Called in case a previously initalized joystick has been disconnected.
|
 |
property OnConnect: TSimpleNotifyEvent read FOnConnect write FOnConnect; |
Called in case a joystick has been connected to the system.
|
Generated by PasDoc 0.16.0.