Show / Hide Table of Contents

# Class GamepadState

Exposes the game gamepad state to dalamud.

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

##### Inheritance

System.Object
GamepadState

##### Implements

System.IDisposable
IServiceType

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Dalamud.Game.ClientState.GamePad

###### Assembly: Dalamud.dll

##### Syntax

    public class GamepadState : IDisposable, IServiceType

### Properties

| Improve this Doc View Source

#### GamepadInputAddress

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

##### Declaration

    public IntPtr GamepadInputAddress { get; }

##### Property Value

Type | Description
--- | ---
System.IntPtr |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 |

| Improve this Doc View Source

#### 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 Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

#### 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 Source

#### IDisposable.Dispose()

Disposes this instance, alongside its hooks.

##### Declaration

    void IDisposable.Dispose()

### Implements

System.IDisposable
IServiceType