diff options
| author | untodesu <kirill@untode.su> | 2025-03-15 16:22:09 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-03-15 16:22:09 +0500 |
| commit | 3bf42c6ff3805a0d42bbc661794a95ff31bedc26 (patch) | |
| tree | 05049955847504808d6bed2bb7b155f8b03807bb /game/client/keybind.hh | |
| parent | 02294547dcde0d4ad76e229106702261e9f10a51 (diff) | |
| download | voxelius-3bf42c6ff3805a0d42bbc661794a95ff31bedc26.tar.bz2 voxelius-3bf42c6ff3805a0d42bbc661794a95ff31bedc26.zip | |
Add whatever I was working on for the last month
Diffstat (limited to 'game/client/keybind.hh')
| -rw-r--r-- | game/client/keybind.hh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/game/client/keybind.hh b/game/client/keybind.hh new file mode 100644 index 0000000..d8e27a7 --- /dev/null +++ b/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 */ |
