Class TGamepadDevicesManager
Unit
Gamolf.RTL.Joystick
Declaration
type TGamepadDevicesManager = class(TInterfacedObject)
Description
Gamepad manager class, to use as a singleton.
Hierarchy
- TInterfacedObject
- TGamepadDevicesManager
Overview
Methods
Properties
Description
Methods
 |
constructor Create; |
|
 |
destructor Destroy; override; |
|
 |
procedure Execute; |
|
 |
procedure DoNewGamepadDetected(const AGamepadID: integer); |
|
 |
procedure DoLostGamepad(const AGamepadID: integer); |
|
 |
procedure DoGamepadDirectionPadChange(const AGamepadID: integer; const AValue: TJoystickDPad); |
|
 |
procedure DoGamepadAxesChange(const AGamepadID: integer; const AAxe: TJoystickAxes; const AValue: single); |
|
 |
procedure DoGamepadButtonDown(const AGamepadID: integer; const AButton: TJoystickButtons); |
|
 |
procedure DoGamepadButtonUp(const AGamepadID: integer; const AButton: TJoystickButtons); |
|
 |
function IsGamepadConnected(const GamepadID: integer): boolean; |
|
 |
class constructor Create; |
|
 |
class destructor Destroy; |
|
 |
function GetGamepad(const AID: integer): TGamepadDevice; |
Return the gamepad data class
|
 |
function GamepadCount: integer; |
Count the detected gamepads number (detected or declared in the OS depending on the platform)
|
 |
function ConnectedGamepadCount: integer; |
Return the connected gamepads number
|
Properties
 |
property IsSupported: boolean read GetIsSupported; |
Check if the gamepad API is available for this platform
|
 |
property Enabled: boolean read FEnabled write SetEnabled; |
Start or stop the gamepad infos check loop
|
 |
property SynchronizedEvents: boolean read FSynchronizedEvents
write SetSynchronizedEvents; |
Execute events in main thread or in the thread used by the gamepad manager
|
 |
property OnNewGamepadDetected: TOnNewGamepadDetected
read FOnNewGamepadDetected write SetOnNewGamepadDetected; |
Used when a new gamepad is detected (it should be connected but can be not).
|
 |
property OnGamepadLost: TOnGamepadLost read FOnGamepadLost
write SetOnGamepadLost; |
To know if a connected gamepad is disconnected from the system or powered off.
|
 |
property OnGamepadButtonUp: TOnGamepadButtonUp read FOnGamepadButtonUp
write SetOnGamepadButtonUp; |
Called when a gamepad button is up (unpressed)
|
 |
property OnGamepadButtonDown: TOnGamepadButtonDown read FOnGamepadButtonDown
write SetOnGamepadButtonDown; |
Called when a gamepad button is down (pressed)
|
 |
property OnGamepadAxesChange: TOnGamepadAxesChange read FOnGamepadAxesChange
write SetOnGamepadAxesChange; |
Called for each new value of a gamepad axe (X,Y or others)
|
 |
property OnGamepadDirectionPadChange: TOnGamepadDirectionPadChange
read FOnGamepadDirectionPadChange write SetOnGamepadDirectionPadChange; |
Called for each direction change from a gamepad DPAD (if available on it)
|
 |
property Tag: integer read FTag write SetTag; |
Tag property "in case of" not used in this class
|
 |
property TagBool: boolean read FTagBool write SetTagBool; |
TagBool property "in case of" not used in this class
|
 |
property TagFloat: single read FTagFloat write SetTagFloat; |
TagFloat property "in case of" not used in this class
|
 |
property TagObject: TObject read FTagObject write SetTagObject; |
TagObject property "in case of" not used in this class
|
 |
property TagString: string read FTagString write SetTagString; |
TagString property "in case of" not used in this class
|
Delphi Game Engine (c) 2021-2025
Patrick PREMARTIN - Powered by
PasDoc
Generated by PasDoc 0.16.0.