Interface IGamepadState
Exposes the game gamepad state to Dalamud.
Will block game's gamepad input if Dalamud.Plugin.Services.IGamepadState.EnableGamepadNav is set.
Assembly: Dalamud.dll​
public interface IGamepadState : IDalamudService
Properties​
GamepadInputAddress​
Gets the pointer to the current instance of the GamepadInput struct.
nint GamepadInputAddress { get; }
EnableGamepadNav​
Gets or sets a value indicating whether gamepad input is intercepted for ImGui navigation, preventing it from passing through to the game. Setting to true is ignored while plugin gamepad input is disabled in Dalamud settings.
bool EnableGamepadNav { get; set; }
LeftStick​
Gets the left analogue sticks tilt vector.
Vector2 LeftStick { get; }
RightStick​
Gets the right analogue sticks tilt vector.
Vector2 RightStick { get; }
Methods​
Pressed(GamepadButtons)​
Gets whether <code class="paramref">button</code> has been pressed.
Only true on first frame of the press. If ImGuiConfigFlags.NavEnableGamepad is set, this is unreliable.
float Pressed(GamepadButtons button)
Returns​
System.Single: 1 if pressed, 0 otherwise.
Parameters​
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.ClientState.GamePad.GamepadButtons | button | The button to check for. |
Repeat(GamepadButtons)​
Gets whether <code class="paramref">button</code> is being pressed.
True in intervals if button is held down. If ImGuiConfigFlags.NavEnableGamepad is set, this is unreliable.
float Repeat(GamepadButtons button)
Returns​
System.Single: 1 if still pressed during interval, 0 otherwise or in between intervals.
Parameters​
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.ClientState.GamePad.GamepadButtons | button | The button to check for. |
Released(GamepadButtons)​
Gets whether <code class="paramref">button</code> has been released.
Only true the frame after release. If ImGuiConfigFlags.NavEnableGamepad is set, this is unreliable.
float Released(GamepadButtons button)
Returns​
System.Single: 1 if released, 0 otherwise.
Parameters​
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.ClientState.GamePad.GamepadButtons | button | The button to check for. |
Raw(GamepadButtons)​
Gets the raw state of <code class="paramref">button</code>.
Is set the entire time a button is pressed down.
float Raw(GamepadButtons button)
Returns​
System.Single: 1 the whole time button is pressed, 0 otherwise.
Parameters​
| Type | Name | Description |
|---|---|---|
| Dalamud.Game.ClientState.GamePad.GamepadButtons | button | The button to check for. |