Table of Contents

Class MouseEventArgs

Namespace
BSGameLib.UI
Assembly
BSGameLib.UI.dll

The arguments for a mouse event on a control: where the pointer was, the mouse state and the keys held.

public class MouseEventArgs : EventArgs
Inheritance
MouseEventArgs
Inherited Members

Constructors

MouseEventArgs()

Creates empty arguments.

public MouseEventArgs()

MouseEventArgs(Snapshot, Vector2, KeyModifiers)

Creates arguments for the mouse state at position, with the keys in modifiers held.

public MouseEventArgs(Mouse.Snapshot state, Vector2 position, KeyModifiers modifiers = KeyModifiers.None)

Parameters

state Mouse.Snapshot
position Vector2
modifiers KeyModifiers

MouseEventArgs(MouseEventArgs)

Creates a copy of e. The copy's Handled is false, whatever e was.

public MouseEventArgs(MouseEventArgs e)

Parameters

e MouseEventArgs

Fields

Difference

How far the pointer moved. The constructors do not set this, so it is zero unless a caller sets it.

public Vector2 Difference

Field Value

Vector2

Modifiers

The modifier keys held when the mouse event happened, so a control can tell Shift+click from a click.

public KeyModifiers Modifiers

Field Value

KeyModifiers

Position

Where the pointer was when the event happened, in the view's space.

public Vector2 Position

Field Value

Vector2

State

The mouse's buttons and position when the event happened.

public Mouse.Snapshot State

Field Value

Mouse.Snapshot