WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
InputManager.h
Go to the documentation of this file.
1#pragma once
2
3// ---- Input Manager --------------------------------------------------------
4// Owns a set of InputBindings and resolves them against ImGui IO state each
5// frame to produce an InputState. The bindings are configurable data;
6// loadDefaults() reproduces the original hardcoded viewer controls.
7
8#include "InputAction.h"
9
10#include <vector>
11
13{
14public:
16
18 void loadDefaults();
19
22 void update();
23
25 const InputState& state() const noexcept { return m_state; }
26
28 std::vector<InputBinding>& bindings() noexcept { return m_bindings; }
29 const std::vector<InputBinding>& bindings() const noexcept { return m_bindings; }
30
31private:
32 std::vector<InputBinding> m_bindings;
34};
void loadDefaults()
Populate the binding table with default viewer controls.
std::vector< InputBinding > & bindings() noexcept
Mutable access to bindings (for future settings UI / serialisation).
const InputState & state() const noexcept
Resolved state from the most recent update().
std::vector< InputBinding > m_bindings
InputState m_state
const std::vector< InputBinding > & bindings() const noexcept