C# Class SFML.Window.Mouse

Give access to the real-time state of the mouse
ファイルを表示 Open project: SFML/SFML.Net Class Usage Examples

Public Methods

Method 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

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

Method Details

GetPosition() public static method

Get the current position of the mouse
public static GetPosition ( ) : Vector2i
return Vector2i

GetPosition() public static method

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

IsButtonPressed() public static method

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

SetPosition() public static method

Set the current position of the mouse
public static SetPosition ( Vector2i position ) : void
position Vector2i New position of the mouse
return void

SetPosition() public static method

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
return void