From 8c17868585e2a12f947ec387947c4521ef21d775 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 2 Jun 2008 16:20:47 +0000 Subject: keyboard binds --- src/client/key.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/client/key.h (limited to 'src/client/key.h') diff --git a/src/client/key.h b/src/client/key.h new file mode 100644 index 0000000..ece7669 --- /dev/null +++ b/src/client/key.h @@ -0,0 +1,42 @@ +/* + client/key.h + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_CLIENT_KEY_H__ +#define __INCLUDED_CLIENT_KEY_H__ + +#include + +namespace client { + +class Key +{ +public: + Key(const char *name, unsigned int keysym, char ascii=0, const char *bind=0); + ~Key(); + + inline float & pressed() { return key_pressed; } + + inline std::string const & name() const { return key_name; } + + inline std::string & bind() { return key_bind; } + + inline char ascii() const { return key_ascii; } + + inline unsigned int sym() const { return key_sym; } + +private: + unsigned int key_sym; + char key_ascii; + + std::string key_name; + std::string key_bind; + + float key_pressed; +}; + +} // namespace client + +#endif // __INCLUDED_CLIENT_KEY_H__ -- cgit v1.2.3