Gorilla.Controller.Input.GamePad
Unit Gorilla.Controller.Input.GamePad.pasClasses
- TGorillaCustomGamePad = class ( TObject )
- TGorillaCustomGamePadHandler = class ( TGorillaInputHandler )
Records
- record TGorillaGamePadButtonHelper
- record TGorillaGamePadTriggers
- record TGorillaThumbStickPosition
Enumerations
- enum TGorillaGamePadDeviceType = ( Default, Wheel, ArcadeStick, FlightStick, DancePad ) ;
- enum TGorillaGamePadButton = ( None, DPadUp, DPadDown, DPadLeft, DPadRight, StartButton, ModeButton, BackButton, LeftThumbStick, RightThumbStick, LeftShoulder, RightShoulder, ButtonA, ButtonB, ButtonX, ButtonY ) ;
Constants
TGorillaGamePadTriggers
Fields
Methods
- public constructor Create ( P : TPoint ) ; public constructor Create ( const X : Integer; const Y : Integer ) ;
- public function operator Equality ( const Lhs : TPoint; const Rhs : TPoint ) : Boolean ; class noself operator overload;
- public function operator Inequality ( const Lhs : TPoint; const Rhs : TPoint ) : Boolean ; class noself operator overload;
- public function operator Addition ( const Lhs : TPoint; const Rhs : TPoint ) : TPoint ; class noself operator overload;
- public function operator Subtraction ( const Lhs : TPoint; const Rhs : TPoint ) : TPoint ; class noself operator overload;
- public function operator Implicit ( Value : TSmallPoint ) : TPoint ; class noself operator overload;
- public function operator Explicit ( Value : TPoint ) : TSmallPoint ; class noself operator overload;
- public function PointInCircle ( const Point : TPoint; const Center : TPoint; const Radius : Integer ) : Boolean ; static inline;
- public function Zero ( ) : TPoint ; static inline;
- public function Distance ( const P2 : TPoint ) : Double ;
- public procedure SetLocation ( const X : Integer; const Y : Integer ) ; overload;
- public procedure SetLocation ( const P : TPoint ) ; overload;
- public procedure Offset ( const DX : Integer; const DY : Integer ) ; overload;
- public procedure Offset ( const Point : TPoint ) ; overload;
- public function Add ( const Point : TPoint ) : TPoint ;
- public function Subtract ( const Point : TPoint ) : TPoint ;
- public function IsZero ( ) : Boolean ;
- public function Angle ( const APoint : TPoint ) : Single ;
TGorillaThumbStickPosition
Fields
Methods
- public constructor Create ( P : TPoint ) ; public constructor Create ( const X : Integer; const Y : Integer ) ;
- public function operator Equality ( const Lhs : TPoint; const Rhs : TPoint ) : Boolean ; class noself operator overload;
- public function operator Inequality ( const Lhs : TPoint; const Rhs : TPoint ) : Boolean ; class noself operator overload;
- public function operator Addition ( const Lhs : TPoint; const Rhs : TPoint ) : TPoint ; class noself operator overload;
- public function operator Subtraction ( const Lhs : TPoint; const Rhs : TPoint ) : TPoint ; class noself operator overload;
- public function operator Implicit ( Value : TSmallPoint ) : TPoint ; class noself operator overload;
- public function operator Explicit ( Value : TPoint ) : TSmallPoint ; class noself operator overload;
- public function PointInCircle ( const Point : TPoint; const Center : TPoint; const Radius : Integer ) : Boolean ; static inline;
- public function Zero ( ) : TPoint ; static inline;
- public function Distance ( const P2 : TPoint ) : Double ;
- public procedure SetLocation ( const X : Integer; const Y : Integer ) ; overload;
- public procedure SetLocation ( const P : TPoint ) ; overload;
- public procedure Offset ( const DX : Integer; const DY : Integer ) ; overload;
- public procedure Offset ( const Point : TPoint ) ; overload;
- public function Add ( const Point : TPoint ) : TPoint ;
- public function Subtract ( const Point : TPoint ) : TPoint ;
- public function IsZero ( ) : Boolean ;
- public function Angle ( const APoint : TPoint ) : Single ;
TGorillaCustomGamePad
Ancestors
Members
Fields
- protected FHandler :
TGorillaCustomGamePadHandler
- protected FID :
Integer
- protected FLatestCheck :
Int64
- protected FAvailable :
Boolean
Methods
- public constructor Create ( const AHandler : TGorillaCustomGamePadHandler; const AID : Integer ) ;
- public destructor Destroy ( ) ;
- protected function GetDeviceType ( ) : TGorillaGamePadDeviceType ; abstract virtual;
- protected function GetButtons ( ) : TGorillaGamePadButtons ; abstract virtual;
- protected function GetTriggers ( ) : TPoint ; abstract virtual;
- protected function GetLeftThumbStickPosition ( ) : TPoint ; abstract virtual;
- protected function GetRightThumbStickPosition ( ) : TPoint ; abstract virtual;
- protected function GetLeftMotorSpeed ( ) : Word ; abstract virtual;
- protected procedure SetLeftMotorSpeed ( const AValue : Word ) ; abstract virtual;
- protected function GetRightMotorSpeed ( ) : Word ; abstract virtual;
- protected procedure SetRightMotorSpeed ( const AValue : Word ) ; abstract virtual;
- protected function GetBatteryType ( ) : Byte ; abstract virtual;
- protected function GetBatteryLevel ( ) : Byte ; abstract virtual;
Properties
- public ID : Integerread FID
- public LatestCheck : Int64
- public Available : Boolean
- public Buttons : TGorillaGamePadButtonsread GetButtons
- public Triggers : TPointread GetTriggers
- public LeftThumbStickPosition : TPoint
- public RightThumbStickPosition : TPoint
- public LeftMotorSpeed : Word
- public RightMotorSpeed : Word
- public BatteryType : Byteread GetBatteryType
- public BatteryLevel : Byteread GetBatteryLevel
TGorillaCustomGamePadHandler
Ancestors
Members
Fields
- protected FMaxUsers :
Byte
- protected FUsers :
:TGorillaCustomGamePadHandler.:1
- public Default :
TGorillaCustomGamePadHandler
Methods
- public constructor Create ( ACtrl : TGorillaInputController ) ;
- protected function GetUserGamePad ( AIndex : Integer ) : TGorillaCustomGamePad ; virtual;
- class private procedure Create@ ( ) ; class constructor noself;
- class private procedure Destroy@ ( ) ; class destructor noself;