summaryrefslogtreecommitdiffstats
path: root/game/client/keybind.hh
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/keybind.hh')
-rw-r--r--game/client/keybind.hh26
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 */