From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/client/key.h | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'src/client/key.h') diff --git a/src/client/key.h b/src/client/key.h index 06e0587..3bb3e2b 100644 --- a/src/client/key.h +++ b/src/client/key.h @@ -11,7 +11,8 @@ #include -namespace client { +namespace client +{ /// a pressable key /** @@ -22,11 +23,11 @@ class Key { public: /// define a new key - Key(const char *name, int keysym, char ascii=0, const char *bind=0); + Key(const char *name, int keysym, char ascii = 0, const char *bind = 0); ~Key(); - + /// key modifiers - enum Modifier { None=0, Shift=KMOD_LSHIFT+KMOD_RSHIFT, Ctrl=KMOD_LCTRL + KMOD_RCTRL, Alt=KMOD_LALT+KMOD_RALT }; + enum Modifier { None = 0, Shift = KMOD_LSHIFT + KMOD_RSHIFT, Ctrl = KMOD_LCTRL + KMOD_RCTRL, Alt = KMOD_LALT + KMOD_RALT }; /// clear all binds void clear(); @@ -41,19 +42,31 @@ public: std::string const & bind(Modifier mod) const; /// first time the key was pressed since previous release - inline float pressed() const { return key_pressed; } + inline float pressed() const { + return key_pressed; + } /// last time the key was pressed (includes repeats) - inline float lastpressed() const { return key_lastpressed; } + inline float lastpressed() const { + return key_lastpressed; + } /// time the key was pressed when it is released - inline float waspressed() const { return key_waspressed; } - - inline std::string const & name() const { return key_name; } + inline float waspressed() const { + return key_waspressed; + } + + inline std::string const & name() const { + return key_name; + } - inline char ascii() const { return key_ascii; } + inline char ascii() const { + return key_ascii; + } - inline int sym() const { return key_sym; } + inline int sym() const { + return key_sym; + } float key_pressed; float key_lastpressed; -- cgit v1.2.3