Skip to main content
Version: 15.x (API 15) [Legacy]

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​
Declaration
public interface IGamepadState : IDalamudService

Properties​

GamepadInputAddress​

Gets the pointer to the current instance of the GamepadInput struct.

Declaration
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.

Declaration
bool EnableGamepadNav { get; set; }

LeftStick​

Gets the left analogue sticks tilt vector.

Declaration
Vector2 LeftStick { get; }

RightStick​

Gets the right analogue sticks tilt vector.

Declaration
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.

Declaration
float Pressed(GamepadButtons button)
Returns​

System.Single: 1 if pressed, 0 otherwise.

Parameters​
TypeNameDescription
Dalamud.Game.ClientState.GamePad.GamepadButtonsbuttonThe 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.

Declaration
float Repeat(GamepadButtons button)
Returns​

System.Single: 1 if still pressed during interval, 0 otherwise or in between intervals.

Parameters​
TypeNameDescription
Dalamud.Game.ClientState.GamePad.GamepadButtonsbuttonThe 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.

Declaration
float Released(GamepadButtons button)
Returns​

System.Single: 1 if released, 0 otherwise.

Parameters​
TypeNameDescription
Dalamud.Game.ClientState.GamePad.GamepadButtonsbuttonThe 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.

Declaration
float Raw(GamepadButtons button)
Returns​

System.Single: 1 the whole time button is pressed, 0 otherwise.

Parameters​
TypeNameDescription
Dalamud.Game.ClientState.GamePad.GamepadButtonsbuttonThe button to check for.