From 540b500f2176966ebfb7f21ebd2c17ddfdcd34e6 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 22 Jul 2008 21:17:15 +0000 Subject: keyboard key repeat --- src/client/key.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/client/key.h') diff --git a/src/client/key.h b/src/client/key.h index 6f190c0..d1a8e96 100644 --- a/src/client/key.h +++ b/src/client/key.h @@ -40,8 +40,12 @@ public: /// return the bind for a specific modifier std::string const & bind(Modifier mod) const; + /// first time the key was pressed since previous release inline float & pressed() { return key_pressed; } + /// last time the key was pressed + inline float & lastpressed() { return key_lastpressed; } + inline std::string const & name() const { return key_name; } inline char ascii() const { return key_ascii; } @@ -54,6 +58,7 @@ private: char key_ascii; float key_pressed; + float key_lastpressed; std::string key_bind; std::string key_bind_shift; -- cgit v1.2.3