Table of Contents

Class MouseEventArgs

Namespace
Fantas.Input
Assembly
Fantas.dll

Event data for Mouse events

public class MouseEventArgs : EventArgs
Inheritance
MouseEventArgs
Inherited Members

Constructors

MouseEventArgs(MouseButtons, int, Vector2, PointF, Vector2, bool)

Initialize Mouse event args

public MouseEventArgs(MouseButtons button, int clicks, Vector2 wheelDelta, PointF location, Vector2 dragDelta, bool hasPreciseScrollingDeltas = false)

Parameters

button MouseButtons
clicks int
wheelDelta Vector2
location PointF
dragDelta Vector2
hasPreciseScrollingDeltas bool

Properties

Button

Button pressed or None if there was no button pressed

public MouseButtons Button { get; }

Property Value

MouseButtons

Clicks

Total of times button was clicked

public int Clicks { get; }

Property Value

int

DragDelta

Delta from begin drag and current position (Scene scale)

public Vector2 DragDelta { get; }

Property Value

Vector2

HasPreciseScrollingDeltas

Used on Mac to detect if Wheel event have precise scroll values for instance when using touch pad scrolling

public bool HasPreciseScrollingDeltas { get; }

Property Value

bool

Location

Cursor position on mouse event (Scene coordinates)

public PointF Location { get; }

Property Value

PointF

WheelDelta

Mouse Wheel Delta

public Vector2 WheelDelta { get; }

Property Value

Vector2