1#include "input/InputManager.h"
17 const int index =
static_cast<int>(key);
18 if (index < 0 || index >=
static_cast<int>(m_keys.size()))
20 LOG_WARN(
"SetKeyPressed out-of-range key=%d (size=%zu)", index, m_keys.size());
23 m_keys[index] = pressed;
28 const int index =
static_cast<int>(key);
29 if (index < 0 || index >=
static_cast<int>(m_keys.size()))
31 LOG_WARN(
"IsKeyPressed out-of-range key=%d (size=%zu)", index, m_keys.size());
44 const int index =
static_cast<int>(button);
45 if (index < 0 || index >=
static_cast<int>(m_mouseKeys.size()))
49 m_mouseKeys[index] = pressed;
54 const int index =
static_cast<int>(button);
55 if (index < 0 || index >=
static_cast<int>(m_mouseKeys.size()))
64 return m_mouseKeys[index];
69 m_mousePositionOld = pos;
74 return m_mousePositionOld;
79 m_mousePositionCurrent = pos;
84 return m_mousePositionCurrent;
89 m_mousePositionChanged = changed;
98 return m_mousePositionChanged;
In-game ImGui overlay: hierarchy, inspector, console, stats.
Console logging macros for all engine and game code.
#define LOG_WARN(fmt,...)
bool IsVisible() const
Editor overlay currently shown?
Editor & GetEditor()
ImGui-based editor overlay.
static Engine & GetInstance()
Returns the single Engine instance (created on first call).
glm::vec2 vec2
2-component float vector (e.g. UV coordinates, mouse position).
static bool EditorSwallowsInput()