Mouse Class (Microsoft.Xna.Framework.Input)

Allows reading position and button click information from mouse.
System.Object
   Microsoft.Xna.Framework.Input.Mouse

Namespace: Microsoft.Xna.Framework.Input
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1018)
  • C#
  • VB
  • F#
public static class Mouse

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The Mouse type exposes the following members.

  Platforms Name Description
WindowHandle Gets or sets the window handle for current mouse processing. 
Top
  Platforms Name Description
GetState(GameWindow) This API is an extension to XNA. Gets mouse state information that includes position and button presses for the provided window 
GetState() Gets mouse state information that includes position and button presses for the primary window 
PlatformSetCursor  
SetCursor Sets the cursor image to the specified MouseCursor. 
SetPosition Sets mouse cursor's relative position to game-window. 
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web