Struct Mouse.Snapshot
The mouse's position and buttons at one moment, with the wheel movement since the last read.
public record struct Mouse.Snapshot : IEquatable<Mouse.Snapshot>
- Implements
- Inherited Members
Constructors
Snapshot(int, int, int, bool, bool, bool, bool, bool)
Creates a snapshot. Every argument defaults to zero, or to no button held.
public Snapshot(int x = 0, int y = 0, int scrollWheelDelta = 0, bool leftButtonPressed = false, bool middleButtonPressed = false, bool rightButtonPressed = false, bool x1ButtonPressed = false, bool x2ButtonPressed = false)
Parameters
xintyintscrollWheelDeltaintleftButtonPressedboolmiddleButtonPressedboolrightButtonPressedboolx1ButtonPressedboolx2ButtonPressedbool
Properties
LeftButtonPressed
Whether the left button is held.
public readonly bool LeftButtonPressed { get; }
Property Value
MiddleButtonPressed
Whether the middle button is held.
public readonly bool MiddleButtonPressed { get; }
Property Value
RightButtonPressed
Whether the right button is held.
public readonly bool RightButtonPressed { get; }
Property Value
ScrollWheelDelta
How far the wheel moved since the last read, in notches.
public readonly int ScrollWheelDelta { get; }
Property Value
X
The x position in window pixels, or the movement since the last read in relative mode.
public readonly int X { get; }
Property Value
X1ButtonPressed
Whether the first side button, usually Back, is held.
public readonly bool X1ButtonPressed { get; }
Property Value
X2ButtonPressed
Whether the second side button, usually Forward, is held.
public readonly bool X2ButtonPressed { get; }
Property Value
Y
The y position in window pixels, or the movement since the last read in relative mode.
public readonly int Y { get; }