#include <sfml_input_impl.hpp>
Public Member Functions | |
| sfml_handler (const sf::Window &pWindow, bool bMouseGrab=false) | |
| Initializes this handler. | |
| void | toggle_mouse_grab () override |
| Toggles mouse grab. | |
| std::string | get_key_name (key::code mKey) const override |
| Returns the name of the key as it appears on the keyboard. | |
| void | update () override |
| Updates this implementation handler. | |
| void | on_sfml_event (const sf::Event &mEvent) |
Definition at line 14 of file sfml_input_impl.hpp.
| input::sfml_handler::sfml_handler | ( | const sf::Window & | pWindow, | |
| bool | bMouseGrab = false | |||
| ) | [explicit] |
Initializes this handler.
| pWindow | The window from which to receive input |
Definition at line 125 of file sfml_input_impl.cpp.
| std::string input::sfml_handler::get_key_name | ( | key::code | mKey | ) | const [override, virtual] |
Returns the name of the key as it appears on the keyboard.
Implements input::handler_impl.
Definition at line 392 of file sfml_input_impl.cpp.
| void input::sfml_handler::on_sfml_event | ( | const sf::Event & | mEvent | ) |
Definition at line 502 of file sfml_input_impl.cpp.
| void input::sfml_handler::toggle_mouse_grab | ( | ) | [override, virtual] |
Toggles mouse grab.
When the mouse is grabbed, it is confined to the borders of the main window. The actual cursor behavior when reaching those borders is of no importance : what matters is that relative mouse movement is always aquired, i.e. the mouse is never blocked. The mouse is not grabbed by default.
Implements input::handler_impl.
Definition at line 148 of file sfml_input_impl.cpp.
| void input::sfml_handler::update | ( | ) | [override, virtual] |
Updates this implementation handler.
Implements input::handler_impl.
Definition at line 448 of file sfml_input_impl.cpp.
1.6.1