![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <KeyboardManager.h>
Public Member Functions | |
| KeyboardManager () | |
| virtual | ~KeyboardManager () |
| void | Initialize () |
| void | Shutdown () |
| void | HandleEvent (const SDL_Event *ev) |
| void | BeginFrame () |
| bool | IsKeyHeld (SDL_Scancode sc) |
| bool | IsKeyPressed (SDL_Scancode sc) |
| bool | IsKeyReleased (SDL_Scancode sc) |
Static Public Member Functions | |
| static KeyboardManager & | GetInstance () |
| static KeyboardManager & | Get () |
Private Member Functions | |
| void | PostKeyEvent (SDL_KeyboardEvent const &ke) |
Private Attributes | |
| std::string | name |
| std::mutex | m_mutex |
| bool | m_keyStates [SDL_SCANCODE_COUNT] = {false} |
| bool | m_keysPressedThisFrame [SDL_SCANCODE_COUNT] = {false} |
| bool | m_keysReleasedThisFrame [SDL_SCANCODE_COUNT] = {false} |
Definition at line 9 of file KeyboardManager.h.
|
inline |
Definition at line 12 of file KeyboardManager.h.
References Initialize(), and name.
Here is the call graph for this function:
|
inlinevirtual |
Definition at line 17 of file KeyboardManager.h.
References Shutdown().
Here is the call graph for this function:| void KeyboardManager::BeginFrame | ( | ) |
Definition at line 27 of file KeyboardManager.cpp.
References GetComponentTypeID_Static(), m_keysPressedThisFrame, m_keysReleasedThisFrame, and m_mutex.
Referenced by SDL_AppEvent(), and SDL_AppIterate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 23 of file KeyboardManager.h.
References GetInstance().
Referenced by InputsManager::HandleEvent(), InputMappingSystem::Process(), CameraSystem::ProcessKeyboardInput(), SDL_AppEvent(), SDL_AppIterate(), and InputsManager::Shutdown().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 7 of file KeyboardManager.cpp.
References GetComponentTypeID_Static().
Referenced by Get().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 56 of file KeyboardManager.cpp.
References GetComponentTypeID_Static(), m_keysPressedThisFrame, m_keysReleasedThisFrame, m_keyStates, m_mutex, and PostKeyEvent().
Referenced by InputsManager::HandleEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| void KeyboardManager::Initialize | ( | ) |
Definition at line 13 of file KeyboardManager.cpp.
References m_keysPressedThisFrame, m_keysReleasedThisFrame, m_keyStates, and SYSTEM_LOG.
Referenced by KeyboardManager().
Here is the caller graph for this function:| bool KeyboardManager::IsKeyHeld | ( | SDL_Scancode | sc | ) |
Definition at line 35 of file KeyboardManager.cpp.
References GetComponentTypeID_Static(), m_keyStates, and m_mutex.
Here is the call graph for this function:| bool KeyboardManager::IsKeyPressed | ( | SDL_Scancode | sc | ) |
Definition at line 42 of file KeyboardManager.cpp.
References GetComponentTypeID_Static(), m_keysPressedThisFrame, and m_mutex.
Here is the call graph for this function:| bool KeyboardManager::IsKeyReleased | ( | SDL_Scancode | sc | ) |
Definition at line 49 of file KeyboardManager.cpp.
References GetComponentTypeID_Static(), m_keysReleasedThisFrame, and m_mutex.
Here is the call graph for this function:
|
private |
Definition at line 88 of file KeyboardManager.cpp.
References Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Input, Olympe_EventType_Keyboard_KeyDown, Olympe_EventType_Keyboard_KeyUp, and EventQueue::Push().
Referenced by HandleEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| void KeyboardManager::Shutdown | ( | ) |
Definition at line 22 of file KeyboardManager.cpp.
References SYSTEM_LOG.
Referenced by InputsManager::Shutdown(), and ~KeyboardManager().
Here is the caller graph for this function:
|
private |
Definition at line 43 of file KeyboardManager.h.
Referenced by BeginFrame(), HandleEvent(), Initialize(), and IsKeyPressed().
|
private |
Definition at line 44 of file KeyboardManager.h.
Referenced by BeginFrame(), HandleEvent(), Initialize(), and IsKeyReleased().
|
private |
Definition at line 42 of file KeyboardManager.h.
Referenced by HandleEvent(), Initialize(), and IsKeyHeld().
|
private |
Definition at line 38 of file KeyboardManager.h.
Referenced by BeginFrame(), HandleEvent(), IsKeyHeld(), IsKeyPressed(), and IsKeyReleased().
|
private |
Definition at line 37 of file KeyboardManager.h.
Referenced by KeyboardManager().