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>2016-07-31 14:14:25 +0200
committerStijn Buys <ingar@osirion.org>2016-07-31 14:14:25 +0200
commit6817dec0b405b325a2762e352ad2a5916c24542a (patch)
treea61a1b756c4ffa18c2a8c9ce874a9ae4cdf591e0 /src/client/control.h
parentb9205ba21a5663d1aa57b1b1213bea5ecbf1c073 (diff)
Added reset_controls function to revert to the default keyboard configuration,
don't override unbound keys with default binds.
Diffstat (limited to 'src/client/control.h')
-rw-r--r--src/client/control.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/client/control.h b/src/client/control.h
index bf30418..5f72aa1 100644
--- a/src/client/control.h
+++ b/src/client/control.h
@@ -22,21 +22,41 @@ public:
Control(const char *name, const char *command, const char * keyname = 0);
~Control();
+ /**
+ * @brief name of this control
+ * */
inline const std::string &name() const
{
return _name;
}
-
- inline const std::string & command() const
+
+ /**
+ * @brief the command executed by this control
+ */
+ inline const std::string &command() const
{
return _command;
}
-
- inline const std::string & keyname() const
+
+ /**
+ * @brief the currently assigned to this control.
+ * */
+ inline const std::string &keyname() const
{
return _keyname;
}
+ /**
+ * @brief the default key assigned to this control.
+ * */
+ inline const std::string &defaultkeyname() const
+ {
+ return _defaultkeyname;
+ }
+
+ /**
+ * @brief assign a key to this control
+ * */
inline void set_keyname(const std::string &keyname)
{
_keyname.assign(keyname);
@@ -46,6 +66,7 @@ private:
std::string _name;
std::string _command;
std::string _keyname;
+ std::string _defaultkeyname;
};
} // namespace client