#include <PhEventHandle.h>
Public Member Functions | |
| PhEventHandler () | |
| Construct. | |
| void | updateEvents () |
| Update events. | |
| bool | getKey (int a) |
| Get key. | |
| bool | getKeyPressed (int a) |
| Get pressed. | |
| PhVector2d | getMousePosition () |
| Get mouse position. | |
| bool | getMouseButton (int a) |
| Get mouse button. | |
| bool | getMouseButtonPressed (int a) |
| Get mouse button pressed. | |
| bool | returnQuit () |
| Return quit. | |
Provides a simple interface to the keyboard, mouse, and other system events. The event handler uses SDL key definitions, for a list of acceptable key definitions, please see the SDL documentation page located at this website
| void phoenix::PhEventHandler::updateEvents | ( | ) |
Update events.
This polls the window manager for new events, this is always handled by the render system.
| bool phoenix::PhEventHandler::getKey | ( | int | a | ) |
Get key.
Gets the state of a current key, true if it is down.
| a | Key to get the state of. |
| bool phoenix::PhEventHandler::getKeyPressed | ( | int | a | ) |
Get pressed.
Gets if a get was just pressed.
| a | Key to get the state of. |
| PhVector2d phoenix::PhEventHandler::getMousePosition | ( | ) |
Get mouse position.
| bool phoenix::PhEventHandler::getMouseButton | ( | int | a | ) |
Get mouse button.
Gives the state of the given mouse button.
| a | Button to get the state of. |
| bool phoenix::PhEventHandler::getMouseButtonPressed | ( | int | a | ) |
Get mouse button pressed.
Returns if the mouse button was just pressed.
| a | Button to get the state of. |
| bool phoenix::PhEventHandler::returnQuit | ( | ) |
Return quit.
1.5.4