Table of Contents

Struct Mouse.Snapshot

Namespace
BSGameLib.Game.Input
Assembly
BSGameLib.Game.dll

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

x int
y int
scrollWheelDelta int
leftButtonPressed bool
middleButtonPressed bool
rightButtonPressed bool
x1ButtonPressed bool
x2ButtonPressed bool

Properties

LeftButtonPressed

Whether the left button is held.

public readonly bool LeftButtonPressed { get; }

Property Value

bool

MiddleButtonPressed

Whether the middle button is held.

public readonly bool MiddleButtonPressed { get; }

Property Value

bool

RightButtonPressed

Whether the right button is held.

public readonly bool RightButtonPressed { get; }

Property Value

bool

ScrollWheelDelta

How far the wheel moved since the last read, in notches.

public readonly int ScrollWheelDelta { get; }

Property Value

int

X

The x position in window pixels, or the movement since the last read in relative mode.

public readonly int X { get; }

Property Value

int

X1ButtonPressed

Whether the first side button, usually Back, is held.

public readonly bool X1ButtonPressed { get; }

Property Value

bool

X2ButtonPressed

Whether the second side button, usually Forward, is held.

public readonly bool X2ButtonPressed { get; }

Property Value

bool

Y

The y position in window pixels, or the movement since the last read in relative mode.

public readonly int Y { get; }

Property Value

int