Skip to main content

Interface IGamepadState

Exposes the game gamepad state to dalamud.

Will block game's gamepad input if ImGuiNET.ImGuiConfigFlags.NavEnableGamepad is set.

Assembly: Dalamud.dll
View Source
Declaration
public interface IGamepadState

Properties

GamepadInputAddress

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

View Source
Declaration
nint GamepadInputAddress { get; }

LeftStick

Gets the left analogue sticks tilt vector.

View Source
Declaration
Vector2 LeftStick { get; }

RightStick

Gets the right analogue sticks tilt vector.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.