Table of Contents

Class MouseEvent

Namespace
MiniTui
Assembly
MiniTui.dll

A mouse report, delivered while WithMouse(bool) is on (1.x spec §4). X and Y are 0-based cells, like Buffer coordinates.

public sealed record MouseEvent : Event, IEquatable<Event>, IEquatable<MouseEvent>
Inheritance
MouseEvent
Implements
Inherited Members

Constructors

MouseEvent(MouseAction, MouseButton, int, int, ConsoleModifiers)

A mouse report, delivered while WithMouse(bool) is on (1.x spec §4). X and Y are 0-based cells, like Buffer coordinates.

public MouseEvent(MouseAction Action, MouseButton Button, int X, int Y, ConsoleModifiers Modifiers = ConsoleModifiers.None)

Parameters

Action MouseAction
Button MouseButton
X int
Y int
Modifiers ConsoleModifiers

Properties

Action

public MouseAction Action { get; init; }

Property Value

MouseAction

Button

public MouseButton Button { get; init; }

Property Value

MouseButton

ClickCount

For a press: 1, or 2 and 3 for the second and third press of a double- or triple-click, counted by the app (1.x spec §17.3). 0 for other actions, and for presses the app hasn't counted.

public int ClickCount { get; init; }

Property Value

int

IsClick

True for a left-button press, the event clicks act on.

public bool IsClick { get; }

Property Value

bool

Modifiers

public ConsoleModifiers Modifiers { get; init; }

Property Value

ConsoleModifiers

Position

The cell, as a Vec2.

public Vec2 Position { get; }

Property Value

Vec2

X

public int X { get; init; }

Property Value

int

Y

public int Y { get; init; }

Property Value

int