From 3bf42c6ff3805a0d42bbc661794a95ff31bedc26 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 15 Mar 2025 16:22:09 +0500 Subject: Add whatever I was working on for the last month --- game/client/keybind.hh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 game/client/keybind.hh (limited to 'game/client/keybind.hh') 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 */ -- cgit