C# Class SFML.Window.Mouse

Give access to the real-time state of the mouse
Afficher le fichier Open project: SFML/SFML.Net Class Usage Examples

Méthodes publiques

Méthode Description
GetPosition ( ) : Vector2i

Get the current position of the mouse

GetPosition ( Window relativeTo ) : Vector2i

Get the current position of the mouse

IsButtonPressed ( Button button ) : bool

Check if a mouse button is pressed

SetPosition ( Vector2i position ) : void

Set the current position of the mouse

SetPosition ( Vector2i position, Window relativeTo ) : void

Set the current position of the mouse

Private Methods

Méthode Description
sfMouse_getPosition ( IntPtr relativeTo ) : Vector2i
sfMouse_isButtonPressed ( Button button ) : bool
sfMouse_setPosition ( Vector2i position, IntPtr relativeTo ) : void

Method Details

GetPosition() public static méthode

Get the current position of the mouse
public static GetPosition ( ) : Vector2i
Résultat Vector2i

GetPosition() public static méthode

Get the current position of the mouse
public static GetPosition ( Window relativeTo ) : Vector2i
relativeTo Window Reference window
Résultat Vector2i

IsButtonPressed() public static méthode

Check if a mouse button is pressed
public static IsButtonPressed ( Button button ) : bool
button Button Button to check
Résultat bool

SetPosition() public static méthode

Set the current position of the mouse
public static SetPosition ( Vector2i position ) : void
position Vector2i New position of the mouse
Résultat void

SetPosition() public static méthode

Set the current position of the mouse
public static SetPosition ( Vector2i position, Window relativeTo ) : void
position Vector2i New position of the mouse
relativeTo Window Reference window
Résultat void