Class TGamepadDevice

Unit

Declaration

type TGamepadDevice = class(TInterfacedObject)

Description

Gamepad class to access data from each gamepad detected on the system

Hierarchy

Overview

Methods

Protected procedure SetNewJoystickInfo(const NewJoystickInfo: TJoystickInfo);
Protected procedure DoAxeChanged(const AAxeID: integer);
Protected procedure DoButtonChanged(const AButtonID: integer);
Protected procedure DoDirectionPadChanged;
Protected procedure DoLost;
Protected procedure RegisterGamePadComponent(const Gamepad: TDGEGamepad);
Protected procedure UnRegisterGamePadComponent(const Gamepad: TDGEGamepad);
Public constructor Create(const AID: integer);
Public destructor Destroy; override;

Properties

Public property ID: integer read FID;
Public property IsSupported: boolean read GetIsSupported;
Public property Enabled: boolean read FEnabled write SetEnabled;
Public property isConnected: boolean read GetIsConnected write SetIsConnected;
Public property hasDPad: boolean read FhasDPAD;
Public property Buttons[constButtonID:TJoystickButtons]: boolean read GetButtons;
Public property Axes[constAxeID:TJoystickAxes]: single read GetAxes;
Public property DPad: TJoystickDPad read getDPad;
Public property SynchronizedEvents: boolean read FSynchronizedEvents write SetSynchronizedEvents;
Public property OnGamepadButtonUp: TOnGamepadButtonUp read FOnButtonUp write SetOnButtonUp;
Public property OnGamepadButtonDown: TOnGamepadButtonDown read FOnButtonDown write SetOnButtonDown;
Public property OnGamepadAxesChange: TOnGamepadAxesChange read FOnAxesChange write SetOnAxesChange;
Public property OnGamepadDirectionPadChange: TOnGamepadDirectionPadChange read FOnDirectionPadChange write SetOnDirectionPadChange;
Public property OnGamepadLost: TOnGamepadLost read FOnLost write SetOnLost;
Public property Tag: integer read FTag write SetTag;
Public property TagBool: boolean read FTagBool write SetTagBool;
Public property TagFloat: single read FTagFloat write SetTagFloat;
Public property TagObject: TObject read FTagObject write SetTagObject;
Public property TagString: string read FTagString write SetTagString;

Description

Methods

Protected procedure SetNewJoystickInfo(const NewJoystickInfo: TJoystickInfo);
 
Protected procedure DoAxeChanged(const AAxeID: integer);
 
Protected procedure DoButtonChanged(const AButtonID: integer);
 
Protected procedure DoDirectionPadChanged;
 
Protected procedure DoLost;
 
Protected procedure RegisterGamePadComponent(const Gamepad: TDGEGamepad);
 
Protected procedure UnRegisterGamePadComponent(const Gamepad: TDGEGamepad);
 
Public constructor Create(const AID: integer);
 
Public destructor Destroy; override;
 

Properties

Public property ID: integer read FID;
 
Public property IsSupported: boolean read GetIsSupported;
 
Public property Enabled: boolean read FEnabled write SetEnabled;
 
Public property isConnected: boolean read GetIsConnected write SetIsConnected;
 
Public property hasDPad: boolean read FhasDPAD;
 
Public property Buttons[constButtonID:TJoystickButtons]: boolean read GetButtons;
 
Public property Axes[constAxeID:TJoystickAxes]: single read GetAxes;
 
Public property DPad: TJoystickDPad read getDPad;
 
Public property SynchronizedEvents: boolean read FSynchronizedEvents write SetSynchronizedEvents;

Execute events in main thread or in the thread used by the gamepad manager

Public property OnGamepadButtonUp: TOnGamepadButtonUp read FOnButtonUp write SetOnButtonUp;
 
Public property OnGamepadButtonDown: TOnGamepadButtonDown read FOnButtonDown write SetOnButtonDown;
 
Public property OnGamepadAxesChange: TOnGamepadAxesChange read FOnAxesChange write SetOnAxesChange;
 
Public property OnGamepadDirectionPadChange: TOnGamepadDirectionPadChange read FOnDirectionPadChange write SetOnDirectionPadChange;
 
Public property OnGamepadLost: TOnGamepadLost read FOnLost write SetOnLost;
 
Public property Tag: integer read FTag write SetTag;

Tag property "in case of" not used in this class

Public property TagBool: boolean read FTagBool write SetTagBool;

TagBool property "in case of" not used in this class

Public property TagFloat: single read FTagFloat write SetTagFloat;

TagFloat property "in case of" not used in this class

Public property TagObject: TObject read FTagObject write SetTagObject;

TagObject property "in case of" not used in this class

Public 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.