diff options
author | Stijn Buys <ingar@osirion.org> | 2008-06-02 16:20:47 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-06-02 16:20:47 +0000 |
commit | 8c17868585e2a12f947ec387947c4521ef21d775 (patch) | |
tree | 83d36d3dc36698aa0d36a3b9b9a8bb0826520586 /src/client/key.h | |
parent | 0f87d2fd05786f7ab128d4a041673f6fb085139f (diff) |
keyboard binds
Diffstat (limited to 'src/client/key.h')
-rw-r--r-- | src/client/key.h | 42 |
1 files changed, 42 insertions, 0 deletions
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 <string> + +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__ |