Record TJoystickInfo
Unit
Declaration
type TJoystickInfo = record
Description
Joystick/gamepad controller datas
Overview
Fields
| Public | Axes: array of single; |
| Public | Buttons: array of boolean; |
| Public | PressedButtons: array of TButtonID; |
| Public | DPad: word; |
Methods
| Public | function isPressed(Button: TJoystickButtons): boolean; |
| Public | procedure setPressed(Button: TJoystickButtons; isPressed: boolean); |
| Public | procedure initButtonsToJoystickButtons; |
Description
Fields
| Public | Axes: array of single; |
|
Values for each axes managed by the joystick 0 => X, 1 => Y, 2 => Z, 3 => R, 4 => U, 5 => V Values between -1 and 1. -1 means left, 0 means center, 1 means right can be around the real value and not egal the values, try round() | |
| Public | Buttons: array of boolean; |
|
List of all available buttons on this controller. Value is true if the button is pressed, false if not | |
| Public | PressedButtons: array of TButtonID; |
|
List of pressed buttons for this controller | |
| Public | DPad: word; |
|
DPad value between 0 (top) and 359, for center, the value is higher than 359 | |
Methods
| Public | function isPressed(Button: TJoystickButtons): boolean; |
|
Check if a button is pressed by it's name (for compatible platforms) | |
| Public | procedure setPressed(Button: TJoystickButtons; isPressed: boolean); |
|
Used by platforms compatibles to set pressed buttons | |
| Public | procedure initButtonsToJoystickButtons; |
|
Initialize the buttons list depending on TJoystickButtons list | |
Generated by PasDoc 1.0.2.