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>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/client/key.h
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/client/key.h')
-rw-r--r--src/client/key.h35
1 files changed, 24 insertions, 11 deletions
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 <string>
-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;