diff options
Diffstat (limited to 'src/game/client/keybind.hh')
| -rw-r--r-- | src/game/client/keybind.hh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/game/client/keybind.hh b/src/game/client/keybind.hh new file mode 100644 index 0000000..8cf3c3c --- /dev/null +++ b/src/game/client/keybind.hh @@ -0,0 +1,26 @@ +#ifndef CLIENT_KEYBIND_HH +#define CLIENT_KEYBIND_HH 1 +#pragma once + +#include "core/config.hh" + +class ConfigKeyBind final : public IConfigValue { +public: + explicit ConfigKeyBind(void); + explicit ConfigKeyBind(int default_value); + virtual ~ConfigKeyBind(void) = default; + + virtual void set(const char* value) override; + virtual const char* get(void) const override; + + void set_key(int keycode); + int get_key(void) const; + + bool equals(int keycode) const; + +private: + const char* m_name; + int m_glfw_keycode; +}; + +#endif /* CLIENT_KEYBIND_HH */ |
