csharp
public interface IGamepadOne connected gamepad.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
State here is a snapshot of what the last pump saw, so reading an axis twice in a frame gives the same answer twice — which is what a simulation wants. Changes also arrive as events, and the two are consistent because they come from the same pump.
Fields and properties (6)
int DeviceIdThe id this device appears under in DeviceId.
string NameThe device's name, for a settings screen.
GamepadKind KindWhich family it belongs to, for drawing the right button glyphs.
int PlayerIndexWhich player slot the OS has assigned, or -1 where there is no such concept.
bool IsConnectedWhether it is still plugged in.
IHaptics? HapticsForce feedback, or if it has none.
Methods (2)
float GetAxis(GamepadAxis axis)Reads an axis: [-1, 1] for sticks, [0, 1] for triggers.
bool IsButtonDown(GamepadButton button)Whether a button is held.
Used by (5)
- DesktopGamepadVixen.Platform.Desktop
- DesktopInputSourceVixen.Platform.Desktop
- HeadlessInputSourceVixen.Platform.Headless
- IInputSourceVixen.Platform
- PlatformInputVixen.App.Hosting