Class GamepadState
Exposes the game gamepad state to dalamud.
Will block game's gamepad input if NavEnableGamepad is set.
Inheritance
Implements
Inherited Members
Namespace: Dalamud.Game.ClientState.GamePad
Assembly: Dalamud.dll
Syntax
public class GamepadState : IDisposable
Constructors
| Improve this Doc View SourceGamepadState(ClientStateAddressResolver)
Initializes a new instance of the GamepadState class.
Declaration
public GamepadState(ClientStateAddressResolver resolver)
Parameters
| Type | Name | Description |
|---|---|---|
| ClientStateAddressResolver | resolver | Resolver knowing the pointer to the GamepadPoll function. |
Properties
| Improve this Doc View SourceGamepadInputAddress
Gets the pointer to the current instance of the GamepadInput struct.
Declaration
public IntPtr GamepadInputAddress { get; }
Property Value
| Type | Description |
|---|---|
| System.IntPtr |
LeftStickDown
Gets the state of the left analogue stick in the down direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float LeftStickDown { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
LeftStickLeft
Gets the state of the left analogue stick in the left direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float LeftStickLeft { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
LeftStickRight
Gets the state of the left analogue stick in the right direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float LeftStickRight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
LeftStickUp
Gets the state of the left analogue stick in the up direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float LeftStickUp { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
RightStickDown
Gets the state of the right analogue stick in the down direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float RightStickDown { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
RightStickLeft
Gets the state of the right analogue stick in the left direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float RightStickLeft { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
RightStickRight
Gets the state of the right analogue stick in the right direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float RightStickRight { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
RightStickUp
Gets the state of the right analogue stick in the up direction between 0 (not tilted) and 1 (max tilt).
Declaration
public float RightStickUp { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
| Improve this Doc View SourceEnable()
Enables the hook of the GamepadPoll function.
Declaration
public void Enable()
Finalize()
Finalizes an instance of the GamepadState class.
Declaration
protected void Finalize()
Pressed(GamepadButtons)
Gets whether button has been pressed.
Only true on first frame of the press. If ImGuiConfigFlags.NavEnableGamepad is set, this is unreliable.
Declaration
public float Pressed(GamepadButtons button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButtons | button | The button to check for. |
Returns
| Type | Description |
|---|---|
| System.Single | 1 if pressed, 0 otherwise. |
Raw(GamepadButtons)
Gets the raw state of button.
Is set the entire time a button is pressed down.
Declaration
public float Raw(GamepadButtons button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButtons | button | The button to check for. |
Returns
| Type | Description |
|---|---|
| System.Single | 1 the whole time button is pressed, 0 otherwise. |
Released(GamepadButtons)
Gets whether button has been released.
Only true the frame after release. If ImGuiConfigFlags.NavEnableGamepad is set, this is unreliable.
Declaration
public float Released(GamepadButtons button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButtons | button | The button to check for. |
Returns
| Type | Description |
|---|---|
| System.Single | 1 if released, 0 otherwise. |
Repeat(GamepadButtons)
Gets whether button is being pressed.
True in intervals if button is held down. If ImGuiConfigFlags.NavEnableGamepad is set, this is unreliable.
Declaration
public float Repeat(GamepadButtons button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButtons | button | The button to check for. |
Returns
| Type | Description |
|---|---|
| System.Single | 1 if still pressed during interval, 0 otherwise or in between intervals. |
Explicit Interface Implementations
| Improve this Doc View SourceIDisposable.Dispose()
Disposes this instance, alongside its hooks.
Declaration
void IDisposable.Dispose()