Class Mouse
Allows reading position and button click information from mouse.
public static class Mouse
- Inheritance
-
Mouse
- Inherited Members
Properties
WindowHandle
Gets or sets the window handle for current mouse processing.
public static nint WindowHandle { get; set; }
Property Value
Methods
GetState()
Gets mouse state information that includes position and button presses for the primary window
public static MouseState GetState()
Returns
- MouseState
Current state of the mouse.
GetState(GameWindow)
This API is an extension to XNA. Gets mouse state information that includes position and button presses for the provided window
public static MouseState GetState(GameWindow window)
Parameters
windowGameWindow
Returns
- MouseState
Current state of the mouse.
SetCursor(MouseCursor)
Sets the cursor image to the specified MouseCursor.
public static void SetCursor(MouseCursor cursor)
Parameters
cursorMouseCursorMouse cursor to use for the cursor image.
SetPosition(int, int)
Sets mouse cursor's relative position to game-window.
public static void SetPosition(int x, int y)