Skip to content

ControlBase.ControlMouseState Class

Mouse state based on a specific control.

C#
public class ControlBase.ControlMouseState

Inheritance object

ControlMouseState(ControlBase, Point, MouseScreenObjectState)

Section titled “ControlMouseState(ControlBase, Point, MouseScreenObjectState)”

Creates an instance of the mouse control state class.

C#
public ControlMouseState(ControlBase control, Point mousePosition, MouseScreenObjectState originalMouseState)

control ControlBase
The control.

mousePosition SadRogue.Primitives.Point
The position of the mouse relative to the control.

originalMouseState MouseScreenObjectState
The original mouse state sent to the control.

ControlMouseState(ControlBase, MouseScreenObjectState)

Section titled “ControlMouseState(ControlBase, MouseScreenObjectState)”

Creates an instance of the mouse control state class and infers the MousePosition from the control and state.

C#
public ControlMouseState(ControlBase control, MouseScreenObjectState originalMouseState)

control ControlBase
The control.

originalMouseState MouseScreenObjectState
The original mouse state sent to the control.

The control this mouse state is associated with.

C#
public ControlBase Control { get; set; }

The relative position of the mouse to the control.

C#
public Point MousePosition { get; set; }

The original mouse state used to generate the event.

C#
public MouseScreenObjectState OriginalMouseState { get; set; }

When true, indicates the mouse is over the Control; othwerise false.

C#
public bool IsMouseOver { get; set; }