about summary refs log tree commit diff
path: root/src/game/client/components/menus.hpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-20 23:10:00 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-10-20 23:10:00 +0000
commitda473cf614cb49ddf15f7dde9cbaeb46aa86babf (patch)
tree80c7612a34f9c8b82b934aaa9ffaa461c0c30d55 /src/game/client/components/menus.hpp
parentac1aeab149f704ab1b297be9c7662c5705e5e40d (diff)
downloadzcatch-da473cf614cb49ddf15f7dde9cbaeb46aa86babf.tar.gz
zcatch-da473cf614cb49ddf15f7dde9cbaeb46aa86babf.zip
fixed various issues with binding keys like enter and f1-f15
Diffstat (limited to 'src/game/client/components/menus.hpp')
-rw-r--r--src/game/client/components/menus.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/client/components/menus.hpp b/src/game/client/components/menus.hpp
index 6332698f..bc733fb6 100644
--- a/src/game/client/components/menus.hpp
+++ b/src/game/client/components/menus.hpp
@@ -3,6 +3,18 @@
 #include <game/client/component.hpp>
 #include <game/client/ui.hpp>
 
+
+// compnent to fetch keypresses, override all other input
+class MENUS_KEYBINDER : public COMPONENT
+{
+public:
+	bool take_key;
+	bool got_key;
+	INPUT_EVENT key;
+	MENUS_KEYBINDER();
+	virtual bool on_input(INPUT_EVENT e);
+};
+
 class MENUS : public COMPONENT
 {	
 	static vec4 gui_color;
@@ -150,6 +162,8 @@ class MENUS : public COMPONENT
 	void render_settings(RECT main_view);
 	
 public:
+	static MENUS_KEYBINDER binder;
+	
 	MENUS();
 
 	void render_loading(float percent);