Show / Hide Table of Contents

Struct MouseScreenObjectState

The state of the mouse.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadConsole.Input
Assembly: SadConsole.dll
Syntax
public struct MouseScreenObjectState

Constructors

MouseScreenObjectState(IScreenObject?, Mouse)

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

Declaration
public MouseScreenObjectState(IScreenObject? screenObject, Mouse mouseData)
Parameters
Type Name Description
IScreenObject screenObject

The screen object to process with the mouse state.

Mouse mouseData

The current mouse state.

Properties

Cell

The cell the mouse is over, from IScreenObject.

Declaration
public ColoredGlyphBase? Cell { readonly get; init; }
Property Value
Type Description
ColoredGlyphBase

CellPosition

The position of the Cell.

Declaration
public Point CellPosition { readonly get; init; }
Property Value
Type Description
Point

IsOnScreenObject

Indicates that the mouse is within the bounds of ScreenObject.

Declaration
public bool IsOnScreenObject { readonly get; init; }
Property Value
Type Description
bool

Mouse

The mouse data.

Declaration
public readonly Mouse Mouse { get; }
Property Value
Type Description
Mouse

ScreenObject

The screen object used to create the mouse state.

Declaration
public readonly IScreenObject? ScreenObject { get; }
Property Value
Type Description
IScreenObject

SurfaceCellPosition

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

Declaration
public Point SurfaceCellPosition { readonly get; init; }
Property Value
Type Description
Point

SurfacePixelPosition

The mouse position in pixels on the screen object.

Declaration
public Point SurfacePixelPosition { readonly get; init; }
Property Value
Type Description
Point

WorldCellPosition

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

Declaration
public Point WorldCellPosition { readonly get; init; }
Property Value
Type Description
Point
In this article

Back to top

Back to top Generated by DocFX