Engine
(NOTE) A Joystick is associated with a hardware joystick, and provides the ability to query axes and buttons.
Methods | Properties | Base Classes | Derived Classes |
---|---|---|---|
Calibrating | AxisCount | eventobject | |
EndCalibration | ButtonCount | ||
GetAxisIndex | DisabledValue | ||
GetAxisName | IsActive | ||
GetAxisValue | Name | ||
GetAxisValueByName | |||
GetButtonValue | |||
LoadInputMapping | |||
SaveInputMapping | |||
StartCalibration |
Properties
AxisCount : integer
read-only
var AxisCount : Integer
ButtonCount : integer
read-only
Get the number of buttons or axes.
var ButtonCount : Integer
DisabledValue : real
read-only
static
A value that means a joystick axis is invalid. For example when a HAT-switch is not pressed down, it will return this value.
var DisabledValue : Real
IsActive : boolean
read-only
Gets whether or not the joystick is active.
var IsActive : Boolean
Name : string
read-only
Get the name of the Joystick.
var Name : String
Methods
Calibrating : boolean
Name Type Description function Calibrating() : Boolean
EndCalibration : Void
Name Type Description function EndCalibration()
GetAxisIndex : integer
Name Type Description name string function GetAxisIndex(name : String) : Integer
GetAxisName : string
Name Type Description index integer function GetAxisName(index : Integer) : String
GetAxisValue : real
Queries an axes and returns a value between [-1, 1]. The valid range of axes is between 0 and 'GetMaxAxes'. If the axis is not valid, then the value returned is 0. If the axis is disabled, then the value returned is Joystick.DisabledValue. |Name|Type|Description| |---|---|---| |index|integer| |
function GetAxisValue(index : Integer) : Real
GetAxisValueByName : real
Name Type Description name string function GetAxisValueByName(name : String) : Real
GetButtonValue : boolean
Queries a button and returns true if it is down, false if it is up The valid range of buttons is between 0 and 'GetMaxButtons' If the button is not valid, then the value returned is false. |Name|Type|Description| |---|---|---| |index|integer| |
function GetButtonValue(index : Integer) : Boolean
LoadInputMapping : Void
Load an input mapping. |Name|Type|Description| |---|---|---| |name|string| |
function LoadInputMapping(name : String)
SaveInputMapping : Void
Name Type Description name string function SaveInputMapping(name : String)
StartCalibration : Void
Name Type Description function StartCalibration()