|
hx3d
1
2D/3D Simple Game Framework
|
Manage real-time inputs. More...
#include <event_manager.hpp>
Public Member Functions | |
| virtual void | poll ()=0 |
| Poll the event queue. | |
| bool | isWindowState (WindowEvent::Type type) |
| Test the window state. More... | |
| bool | isMouseButtonClicked (MouseButtonEvent::Button button) |
| Test if a mouse button have been clicked. More... | |
| bool | isMouseButtonReleased (MouseButtonEvent::Button button) |
| Test if a mouse button have been relased. More... | |
| bool | isMouseButtonJustClicked (MouseButtonEvent::Button button) |
| Test if a mouse button have just been clicked. More... | |
| bool | isMouseButtonJustReleased (MouseButtonEvent::Button button) |
| Test if a mouse button have just been released. More... | |
| bool | isMouseWheelTurned (MouseWheelEvent::Direction direction) |
| Test if the mouse wheel have been turned in a direction. More... | |
| bool | isScreenTouched () |
| Test if the screen have been touched. More... | |
| bool | isScreenReleased () |
| Test if the screen have been released. More... | |
| bool | isScreenJustTouched () |
| Test if the screen have been just touched. More... | |
| bool | isScreenJustReleased () |
| Test if the screen have been just released. More... | |
| bool | isKeyPressed (KeyEvent::Key key) |
| Test if the key have been pressed. More... | |
| bool | isKeyReleased (KeyEvent::Key key) |
| Test if the key have been released. More... | |
| bool | isKeyJustPressed (KeyEvent::Key key) |
| Test if the key have just been pressed. More... | |
| bool | isKeyJustReleased (KeyEvent::Key key) |
| Test if the key have just been released. More... | |
| glm::vec2 | getMousePosition () |
| Get the current mouse position. More... | |
| glm::vec2 | getMouseMovement () |
| Get the current mouse movement. More... | |
| glm::vec2 | getMouseWheelMovement () |
| Get the current mouse wheel movement. More... | |
| glm::vec2 | getTouchPosition () |
| Get the current touch position. More... | |
| glm::vec2 | getScreenConvertedTouchPosition () |
| Get the screen converted touch position. More... | |
| glm::vec2 | getTouchMovement () |
| Get the current touch movement. More... | |
| float | getTouchPressure () |
| Get the current touch pressure. More... | |
| void | emulateTouchWithMouse (bool value) |
| Emulate the touch system with the mouse. More... | |
| void | setInputHandler (InputHandler *handler) |
| Define an input handler. More... | |
| void | setInputHandler (Ptr< InputHandler > handler) |
| Define an input handler. More... | |
Protected Attributes | |
| bool * | _keysReleased |
| Keys released. | |
| bool * | _keysPressed |
| Keys pressed. | |
| bool * | _mouseButtonClicked |
| Mouse buttons clicked. | |
| bool * | _mouseButtonReleased |
| Mouse buttons released. | |
| bool * | _mouseWheelTurned |
| Mouse wheels turned. | |
| bool * | _windowEvents |
| Window events. | |
| bool | _screenTouched |
| Screen touched ? | |
| bool | _screenReleased |
| Screen released ? | |
| glm::vec2 | _mousePosition |
| Mouse position. | |
| glm::vec2 | _mouseMovement |
| Mouse movement. | |
| glm::vec2 | _mouseWheelMovement |
| Mouse wheel movement. | |
| glm::vec2 | _touchPosition |
| Touch position. | |
| glm::vec2 | _touchMovement |
| Touch movement. | |
| float | _touchPressure |
| Touch pressure. | |
| bool | _touchSimulation |
| Is touch simulated with mouse ? | |
| InputHandler * | _currentHandler |
| Current input handler. | |
Manage real-time inputs.
Definition at line 39 of file event_manager.hpp.
| void hx3d::window::EventManager::emulateTouchWithMouse | ( | bool | value | ) |
Emulate the touch system with the mouse.
This will emulate the touch position and the touch movement. When clicked, the touch pressure will be at 1.0.
| value | True/False |
Definition at line 189 of file event_manager.cpp.
| glm::vec2 hx3d::window::EventManager::getMouseMovement | ( | ) |
Get the current mouse movement.
Definition at line 161 of file event_manager.cpp.
| glm::vec2 hx3d::window::EventManager::getMousePosition | ( | ) |
Get the current mouse position.
Definition at line 157 of file event_manager.cpp.
| glm::vec2 hx3d::window::EventManager::getMouseWheelMovement | ( | ) |
Get the current mouse wheel movement.
Definition at line 165 of file event_manager.cpp.
| glm::vec2 hx3d::window::EventManager::getScreenConvertedTouchPosition | ( | ) |
Get the screen converted touch position.
Definition at line 173 of file event_manager.cpp.
| glm::vec2 hx3d::window::EventManager::getTouchMovement | ( | ) |
Get the current touch movement.
Definition at line 181 of file event_manager.cpp.
| glm::vec2 hx3d::window::EventManager::getTouchPosition | ( | ) |
Get the current touch position.
Definition at line 169 of file event_manager.cpp.
| float hx3d::window::EventManager::getTouchPressure | ( | ) |
Get the current touch pressure.
Definition at line 185 of file event_manager.cpp.
| bool hx3d::window::EventManager::isKeyJustPressed | ( | KeyEvent::Key | key | ) |
Test if the key have just been pressed.
| key | Key |
Definition at line 139 of file event_manager.cpp.
| bool hx3d::window::EventManager::isKeyJustReleased | ( | KeyEvent::Key | key | ) |
Test if the key have just been released.
| key | Key |
Definition at line 148 of file event_manager.cpp.
| bool hx3d::window::EventManager::isKeyPressed | ( | KeyEvent::Key | key | ) |
Test if the key have been pressed.
| key | Key |
Definition at line 129 of file event_manager.cpp.
| bool hx3d::window::EventManager::isKeyReleased | ( | KeyEvent::Key | key | ) |
Test if the key have been released.
| key | Key |
Definition at line 134 of file event_manager.cpp.
| bool hx3d::window::EventManager::isMouseButtonClicked | ( | MouseButtonEvent::Button | button | ) |
Test if a mouse button have been clicked.
| button | Button |
Definition at line 68 of file event_manager.cpp.
| bool hx3d::window::EventManager::isMouseButtonJustClicked | ( | MouseButtonEvent::Button | button | ) |
Test if a mouse button have just been clicked.
| button | Button |
Definition at line 78 of file event_manager.cpp.
| bool hx3d::window::EventManager::isMouseButtonJustReleased | ( | MouseButtonEvent::Button | button | ) |
Test if a mouse button have just been released.
| button | Button |
Definition at line 87 of file event_manager.cpp.
| bool hx3d::window::EventManager::isMouseButtonReleased | ( | MouseButtonEvent::Button | button | ) |
Test if a mouse button have been relased.
| button | Button |
Definition at line 73 of file event_manager.cpp.
| bool hx3d::window::EventManager::isMouseWheelTurned | ( | MouseWheelEvent::Direction | direction | ) |
Test if the mouse wheel have been turned in a direction.
| direction | Direction |
Definition at line 96 of file event_manager.cpp.
| bool hx3d::window::EventManager::isScreenJustReleased | ( | ) |
Test if the screen have been just released.
Definition at line 121 of file event_manager.cpp.
| bool hx3d::window::EventManager::isScreenJustTouched | ( | ) |
Test if the screen have been just touched.
Definition at line 113 of file event_manager.cpp.
| bool hx3d::window::EventManager::isScreenReleased | ( | ) |
Test if the screen have been released.
Definition at line 109 of file event_manager.cpp.
| bool hx3d::window::EventManager::isScreenTouched | ( | ) |
Test if the screen have been touched.
Definition at line 105 of file event_manager.cpp.
| bool hx3d::window::EventManager::isWindowState | ( | WindowEvent::Type | type | ) |
Test the window state.
| type | Type |
Definition at line 59 of file event_manager.cpp.
| void hx3d::window::EventManager::setInputHandler | ( | InputHandler * | handler | ) |
Define an input handler.
| handler | Input handler (Raw ptr) |
Definition at line 197 of file event_manager.cpp.
| void hx3d::window::EventManager::setInputHandler | ( | Ptr< InputHandler > | handler | ) |
Define an input handler.
| handler | Input handler (Ptr) |
Definition at line 193 of file event_manager.cpp.
1.8.11