Class MouseHandler
Manages the mouse button input and cursor positioning.
public class MouseHandler
- Inheritance
-
MouseHandler
- Inherited Members
Properties
IsEnabled
Gets or sets whether mouse input processing is enabled.
Default is true.
public bool IsEnabled { get; set; }
Property Value
LeftDown
Gets whether the left mouse button is currently held down.
public bool LeftDown { get; }
Property Value
LeftPressed
Gets whether the left mouse button was pressed this frame.
public bool LeftPressed { get; }
Property Value
LeftReleased
Gets whether the left mouse button was released this frame.
public bool LeftReleased { get; }
Property Value
LeftUp
Gets whether the left mouse button is currently up.
public bool LeftUp { get; }
Property Value
Position
Gets the mouse cursor position in world coordinates.
public Vector2 Position { get; }
Property Value
- Vector2
Remarks
This value includes the camera offset.
RightDown
Gets whether the right mouse button is currently held down.
public bool RightDown { get; }
Property Value
RightPressed
Gets whether the right mouse button was pressed this frame.
public bool RightPressed { get; }
Property Value
RightReleased
Gets whether the right mouse button was released this frame.
public bool RightReleased { get; }
Property Value
RightUp
Gets whether the right mouse button is currently up.
public bool RightUp { get; }
Property Value
TruePosition
Gets the mouse cursor position in screen coordinates.
public Point TruePosition { get; }
Property Value
- Point
Remarks
The value is scaled relative to the internal resolution (Resolution), ignoring the camera.
Methods
Update(Rectangle)
public void Update(Rectangle displayRect)
Parameters
displayRectRectangle