From cc335cfbf13a6b21c5f65febc6049eb5d4c16b63 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 1 Aug 2008 13:08:27 +0000 Subject: model->enginecolor(), removed autolevel, added selection delay --- src/client/key.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/client/key.h') diff --git a/src/client/key.h b/src/client/key.h index d1a8e96..06e0587 100644 --- a/src/client/key.h +++ b/src/client/key.h @@ -41,10 +41,13 @@ public: std::string const & bind(Modifier mod) const; /// first time the key was pressed since previous release - inline float & pressed() { return key_pressed; } + inline float pressed() const { return key_pressed; } - /// last time the key was pressed - inline float & lastpressed() { return key_lastpressed; } + /// last time the key was pressed (includes repeats) + 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; } @@ -52,14 +55,15 @@ public: inline int sym() const { return key_sym; } + float key_pressed; + float key_lastpressed; + float key_waspressed; + private: std::string key_name; int key_sym; char key_ascii; - float key_pressed; - float key_lastpressed; - std::string key_bind; std::string key_bind_shift; std::string key_bind_ctrl; -- cgit v1.2.3