Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-01 13:08:27 +0000
committerStijn Buys <ingar@osirion.org>2008-08-01 13:08:27 +0000
commitcc335cfbf13a6b21c5f65febc6049eb5d4c16b63 (patch)
tree5ae976b9fd3bdc11e0ccfc9d8db061751a7503d8 /src/client/key.h
parent8ddeb66959f5a40192940260932636196ab8151f (diff)
model->enginecolor(), removed autolevel, added selection delay
Diffstat (limited to 'src/client/key.h')
-rw-r--r--src/client/key.h16
1 files changed, 10 insertions, 6 deletions
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;