Skip to content

IMouseState Interface

Reports the state of the mouse.

C#
public interface IMouseState

true when the left mouse button is pressed; otherwise, false.

C#
bool IsLeftButtonDown { get; }

true when the right mouse button is pressed; otherwise, false.

C#
bool IsRightButtonDown { get; }

true when the middle mouse button is pressed; otherwise, false.

C#
bool IsMiddleButtonDown { get; }

The pixel position of the mouse on the screen relative to the game window.

C#
Point ScreenPosition { get; }

The value of the mouse wheel.

C#
int MouseWheel { get; }

If applicable to the host implementation, refreshes the mouse state.

C#
void Refresh()