Vixen
02b45cc4
csharp
public sealed class MouseDevice

The pointer: its buttons, where it is, and how far it moved this frame.

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

Remarks

Motion is per frame and is cleared by BeginFrame. A camera reads a delta, and a delta that kept its last value once the mouse stopped would spin the camera forever. Position is not cleared, because a position is a state.

Fields and properties (7)

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

  • public Vector2 Position

    Where the pointer is within the window, in logical points.

  • public Vector2 Delta

    How far it moved this frame, in logical points.

  • public Vector2 Scroll

    How far the wheel turned this frame, in notches.

Methods (2)

  • public bool IsDown(MouseControl button)

    Whether a button is held.

  • public float ReadValue(InputControl control)

    Reads one of its controls.

Used by (2)

  • InputDeviceSetVixen.Input
  • PlatformInputTestsVixen.App.Tests