Interface IGamepadComponent
Assembly: OpenTK.Platform.dll
public interface IGamepadComponent : IPalComponent
Properties
The recommended deadzone value for the left analog stick.
Declaration
float LeftDeadzone { get; }
Property Value
The recommended deadzone value for the right analog stick.
Declaration
float RightDeadzone { get; }
Property Value
The recommended threshold for considering the left or right trigger pressed.
Declaration
float TriggerThreshold { get; }
Property Value
Methods
Closes a handle to a joystick.
Declaration
void Close(JoystickHandle handle)
Parameters
Gets the value of a specific joystick axis.
This value is in the range [-1, 1] for analog sticks, and [0, 1] for triggers.
Declaration
float GetAxis(JoystickHandle handle, JoystickAxis axis)
Parameters
Returns
| Type |
Description |
| float |
The joystick axis value.
|
Get the pressed state of a specific joystick button.
Declaration
bool GetButton(JoystickHandle handle, JoystickButton button)
Parameters
Returns
| Type |
Description |
| bool |
True if the specified button is pressed or false if the button is released.
|
Declaration
Guid GetGuid(JoystickHandle handle)
Parameters
Returns
Declaration
string GetName(JoystickHandle handle)
Parameters
Returns
Checks wether a joystick with the specific index is present on the system or not.
Declaration
bool IsConnected(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
The index of the joystick.
|
Returns
| Type |
Description |
| bool |
If a joystick with the specified index is connected.
|
Opens a handle to a specific joystick.
Declaration
JoystickHandle Open(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
The player index of the joystick to open.
|
Returns
Declaration
bool SetVibration(JoystickHandle handle, float lowFreqIntensity, float highFreqIntensity)
Parameters
Returns
Declaration
bool TryGetBatteryInfo(JoystickHandle handle, out GamepadBatteryInfo batteryInfo)
Parameters
Returns