SFML 3.0.2
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions | Variables
Mouse.hpp File Reference
`#include <SFML/Window/Export.hpp>`
`#include <SFML/System/Vector2.hpp>`

Go to the source code of this file.

## Namespaces

namespace | sf
namespace | sf::Mouse
| Give access to the real-time state of the mouse.

## Enumerations

enum class | sf::Mouse::Button { sf::Mouse::Left , sf::Mouse::Right , sf::Mouse::Middle , sf::Mouse::Extra1 , sf::Mouse::Extra2 }
| Mouse buttons. More...
enum class | sf::Mouse::Wheel { sf::Mouse::Vertical , sf::Mouse::Horizontal }
| Mouse wheels. More...

## Functions

bool | sf::Mouse::isButtonPressed (Button button)
| Check if a mouse button is pressed.
Vector2i | sf::Mouse::getPosition ()
| Get the current position of the mouse in desktop coordinates.
Vector2i | sf::Mouse::getPosition (const WindowBase &relativeTo)
| Get the current position of the mouse in window coordinates.
void | sf::Mouse::setPosition (Vector2i position)
| Set the current position of the mouse in desktop coordinates.
void | sf::Mouse::setPosition (Vector2i position, const WindowBase &relativeTo)
| Set the current position of the mouse in window coordinates.

## Variables

static constexpr unsigned int | sf::Mouse::ButtonCount {5}
| The total number of mouse buttons.