Skip to content

MouseScreenObjectState Struct

The state of the mouse.

C#
public struct MouseScreenObjectState

MouseScreenObjectState(IScreenObject?, Mouse)

Section titled “MouseScreenObjectState(IScreenObject?, Mouse)”

Calculates a new MouseScreenObjectState based on an IScreenObject and Mouse state.

C#
public MouseScreenObjectState(IScreenObject? screenObject, Mouse mouseData)

screenObject IScreenObject
The screen object to process with the mouse state.

mouseData Mouse
The current mouse state.

The screen object used to create the mouse state.

C#
public readonly IScreenObject? ScreenObject { get; }

The mouse data.

C#
public readonly Mouse Mouse { get; }

The cell the mouse is over, from IScreenObject.

C#
public ColoredGlyphBase? Cell { readonly get; init; }

The position of the Cell.

C#
public Point CellPosition { readonly get; init; }

The position of the mouse on the IScreenObject, based on the WorldCellPosition and the position of the ScreenObject.

C#
public Point SurfaceCellPosition { readonly get; init; }

A cell-based location of the mouse based on the screen, not the screen object.

C#
public Point WorldCellPosition { readonly get; init; }

The mouse position in pixels on the screen object.

C#
public Point SurfacePixelPosition { readonly get; init; }

Indicates that the mouse is within the bounds of ScreenObject.

C#
public bool IsOnScreenObject { readonly get; init; }