Mouse Class
Definition
Section titled “Definition”The state of the mouse.
public class MouseInheritance object
Constructors
Section titled “Constructors”Mouse()
Section titled “Mouse()”public Mouse()Properties
Section titled “Properties”ScreenPosition
Section titled “ScreenPosition”The pixel position of the mouse on the screen.
public Point ScreenPosition { get; set; }MiddleButtonDown
Section titled “MiddleButtonDown”Indicates the middle mouse button is currently being pressed.
public bool MiddleButtonDown { get; set; }MiddleButtonDownDuration
Section titled “MiddleButtonDownDuration”The amount of time the middle button has been held down.
public TimeSpan MiddleButtonDownDuration { get; }MiddleClicked
Section titled “MiddleClicked”Indicates the middle mouse button was clicked. (Held and then released)
public bool MiddleClicked { get; set; }MiddleDoubleClicked
Section titled “MiddleDoubleClicked”Indicates the middle mouse button was double-clicked within one second.
public bool MiddleDoubleClicked { get; set; }LeftButtonDown
Section titled “LeftButtonDown”Indicates the left mouse button is currently being pressed.
public bool LeftButtonDown { get; set; }LeftButtonDownDuration
Section titled “LeftButtonDownDuration”The amount of time the left button has been held down.
public TimeSpan LeftButtonDownDuration { get; }LeftClicked
Section titled “LeftClicked”Indicates the left mouse button was clicked. (Held and then released)
public bool LeftClicked { get; set; }LeftDoubleClicked
Section titled “LeftDoubleClicked”Indicates the left mouse button was double-clicked within one second.
public bool LeftDoubleClicked { get; set; }RightButtonDown
Section titled “RightButtonDown”Indicates the right mouse button is currently being pressed.
public bool RightButtonDown { get; set; }RightButtonDownDuration
Section titled “RightButtonDownDuration”The amount of time the right button has been held down.
public TimeSpan RightButtonDownDuration { get; }RightClicked
Section titled “RightClicked”Indicates the right mouse button was clicked. (Held and then released)
public bool RightClicked { get; set; }RightDoubleClicked
Section titled “RightDoubleClicked”Indicates the right mouse button was double-clicked within one second.
public bool RightDoubleClicked { get; set; }ScrollWheelValue
Section titled “ScrollWheelValue”The cumulative value of the scroll wheel.
public int ScrollWheelValue { get; set; }ScrollWheelValueChange
Section titled “ScrollWheelValueChange”The scroll wheel value change between frames.
public int ScrollWheelValueChange { get; set; }IsOnScreen
Section titled “IsOnScreen”Indicates that the mouse is currently within the bounds of the rendering area.
public bool IsOnScreen { get; }Methods
Section titled “Methods”Update(TimeSpan)
Section titled “Update(TimeSpan)”Reads the mouse state from GetMouseState().
public void Update(TimeSpan elapsedSeconds)Parameters
Section titled “Parameters”elapsedSeconds TimeSpan
Fractional seconds passed since Update was called.
Clear()
Section titled “Clear()”Clears the buttons, position, wheel information.
public void Clear()Process()
Section titled “Process()”Builds information about the mouse state based on the FocusedScreenObjects or Screen. Should be called each frame.
public virtual void Process()ClearLastMouseScreenObject()
Section titled “ClearLastMouseScreenObject()”Unlocks the last screen object the mouse was locked to. Allows another console to become locked to the mouse.
public void ClearLastMouseScreenObject()IsMouseOverScreenObjectSurface(IScreenSurface)
Section titled “IsMouseOverScreenObjectSurface(IScreenSurface)”Returns true when the mouse is currently over the provided screen object.
public bool IsMouseOverScreenObjectSurface(IScreenSurface screenObject)Parameters
Section titled “Parameters”screenObject IScreenSurface
The screen object to check.
Returns
Section titled “Returns”bool
True or false indicating if the mouse is over the screen object.
Clone()
Section titled “Clone()”Clones this mouse into a new object.
public Mouse Clone()Returns
Section titled “Returns”Mouse
A clone.