Vixen
02b45cc4
csharp
public sealed class GamepadDevice

One gamepad: its buttons, its axes, and the identity a settings screen shows.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Axes are stored raw. A dead zone is a processor on the binding, because it is a gameplay and accessibility decision and applying one here would destroy information the layer above cannot get back — the same reason IGamepad.GetAxis gives one layer down.

Fields and properties (4)

  • public InputDeviceKind Kind

    Which family it belongs to.

  • public int DeviceId

    The id its events arrive under, or 0 for the singleton devices.

  • public string Name

    Its name, for a settings screen.

  • public bool IsConnected

    Whether it is still there.

Methods (3)

  • public bool IsDown(GamepadControl button)

    Whether a button is held.

  • public float GetAxis(GamepadControl axis)

    Reads an axis, with no dead zone applied.

  • public float ReadValue(InputControl control)

    Reads one of its controls.

Used by (4)

  • InputActionTestsVixen.Input.Tests
  • InputDeviceSetVixen.Input
  • InputRebindingTestsVixen.Input.Tests
  • PlatformInputTestsVixen.App.Tests