InputManager Class Reference
[Input]

Classes | |
| struct | Cursor |
Public Member Functions | |
| InputManager () | |
| virtual | ~InputManager () |
| void | Update () |
| float | GetCursorX () |
| float | GetCursorY () |
| bool | IsKeyDown (KeyCode key) |
| bool | WasKeyPressed (KeyCode key) |
| bool | WasKeyReleased (KeyCode key) |
| bool | IsAnyKeyDown () |
| bool | WasAnyKeyPressed () |
| bool | WasAnyKeyReleased () |
| bool | IsCharDown (unsigned char ascii) |
| bool | WasCharPressed (unsigned char ascii) |
| bool | WasCharReleased (unsigned char ascii) |
| void | ClearCharacters () |
| int | GetCharacterCount () |
| char | GetCharacter (int index) |
| void | CreateCursor (int id, const char *image, int hotspotX, int hotspotY) |
| void | SetCursor (int id) |
| *** SetCursor *** | |
| void | ShowCursor () |
| void | HideCursor () |
| void | RestoreCursor () |
Detailed Description
- Todo:
- Gamepad support
Mapping system (from QtickyEngine?)
Event system, where gamestates can register for the Input events it's interested in, and be called when they are triggered only. This is so we can have a fully event-driven gamestates (no need to poll input manager in the Update function, which should make things cleaner, and make most GameStates not need an Update function)
Definition at line 30 of file InputManager.h.
Constructor & Destructor Documentation
| InputManager::InputManager | ( | ) |
Definition at line 17 of file InputManager.cpp.
| InputManager::~InputManager | ( | ) | [virtual] |
Definition at line 50 of file InputManager.cpp.
Member Function Documentation
| void InputManager::Update | ( | ) |
Definition at line 58 of file InputManager.cpp.
| float InputManager::GetCursorX | ( | ) |
Definition at line 112 of file InputManager.cpp.
| float InputManager::GetCursorY | ( | ) |
Definition at line 120 of file InputManager.cpp.
| bool InputManager::IsKeyDown | ( | KeyCode | key | ) |
Definition at line 128 of file InputManager.cpp.
| bool InputManager::WasKeyPressed | ( | KeyCode | key | ) |
Definition at line 142 of file InputManager.cpp.
| bool InputManager::WasKeyReleased | ( | KeyCode | key | ) |
Definition at line 156 of file InputManager.cpp.
| bool InputManager::IsAnyKeyDown | ( | ) |
Definition at line 170 of file InputManager.cpp.
| bool InputManager::WasAnyKeyPressed | ( | ) |
Definition at line 186 of file InputManager.cpp.
| bool InputManager::WasAnyKeyReleased | ( | ) |
Definition at line 201 of file InputManager.cpp.
| bool InputManager::IsCharDown | ( | unsigned char | ascii | ) |
Definition at line 216 of file InputManager.cpp.
| bool InputManager::WasCharPressed | ( | unsigned char | ascii | ) |
Definition at line 224 of file InputManager.cpp.
| bool InputManager::WasCharReleased | ( | unsigned char | ascii | ) |
Definition at line 232 of file InputManager.cpp.
| void InputManager::ClearCharacters | ( | ) |
Definition at line 240 of file InputManager.cpp.
| int InputManager::GetCharacterCount | ( | ) |
Definition at line 248 of file InputManager.cpp.
| char InputManager::GetCharacter | ( | int | index | ) |
Definition at line 256 of file InputManager.cpp.
| void InputManager::CreateCursor | ( | int | id, | |
| const char * | image, | |||
| int | hotspotX, | |||
| int | hotspotY | |||
| ) |
Definition at line 269 of file InputManager.cpp.
| void InputManager::SetCursor | ( | int | id | ) |
| void InputManager::ShowCursor | ( | ) |
Definition at line 312 of file InputManager.cpp.
| void InputManager::HideCursor | ( | ) |
Definition at line 330 of file InputManager.cpp.
| void InputManager::RestoreCursor | ( | ) |
Definition at line 351 of file InputManager.cpp.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
