about summary refs log tree commit diff
path: root/src/game/client/components/menus_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/menus_settings.cpp')
-rw-r--r--src/game/client/components/menus_settings.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp
index 3db02aa4..2e7a6912 100644
--- a/src/game/client/components/menus_settings.cpp
+++ b/src/game/client/components/menus_settings.cpp
@@ -18,6 +18,30 @@
 #include "menus.hpp"
 #include "skins.hpp"
 
+MENUS_KEYBINDER MENUS::binder;
+
+MENUS_KEYBINDER::MENUS_KEYBINDER()
+{
+	take_key = false;
+	got_key = false;
+}
+
+bool MENUS_KEYBINDER::on_input(INPUT_EVENT e)
+{
+	if(take_key)
+	{
+		if(e.flags&INPFLAG_PRESS && e.key != KEY_ESC)
+		{
+			key = e;
+			got_key = true;
+			take_key = false;
+		}
+		return true;
+	}
+	
+	return false;
+}
+
 void MENUS::render_settings_player(RECT main_view)
 {
 	RECT button;