summaryrefslogtreecommitdiff
path: root/src/keyboardconfig.h
diff options
context:
space:
mode:
authorJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-19 08:34:48 +0000
committerJoshua Langley <joshlangley[at]optusnet.com.au>2007-08-19 08:34:48 +0000
commitfd168c24b9bc45c4bc6c092d072fef835063918e (patch)
tree0ebae915bb6c0ca92b5628c783d371b5bfcf0140 /src/keyboardconfig.h
parentfccffaf115ebd6b3f08cb9e5636a5da5cffe35e0 (diff)
downloadmana-fd168c24b9bc45c4bc6c092d072fef835063918e.tar.gz
mana-fd168c24b9bc45c4bc6c092d072fef835063918e.tar.bz2
mana-fd168c24b9bc45c4bc6c092d072fef835063918e.tar.xz
mana-fd168c24b9bc45c4bc6c092d072fef835063918e.zip
v0.0.23 - src/keyboardconfig.cpp, src/keyboardconfig.h - minor cleanup.
Diffstat (limited to 'src/keyboardconfig.h')
-rw-r--r--src/keyboardconfig.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index 64d80629..1a7d84b9 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -35,19 +35,9 @@
*/
struct KeyFunction
{
- KeyFunction() {}
-
- KeyFunction(std::string configField,
- int defaultValue,
- std::string caption):
- configField(configField),
- caption(caption),
- defaultValue(defaultValue)
- {}
-
- std::string configField; /** Field index that is in the config file. */
- std::string caption; /** The caption value for the key function. */
+ const char* configField; /** Field index that is in the config file. */
int defaultValue; /** The default key value used. */
+ std::string caption; /** The caption value for the key function. */
int value; /** The actual value that is used. */
};
@@ -105,7 +95,7 @@ class KeyboardConfig
/**
* Get the key caption, providing more meaning to the user.
*/
- std::string const &getKeyCaption(int index) const
+ const std::string &getKeyCaption(int index) const
{ return mKey[index].caption; }
/**
@@ -150,10 +140,7 @@ class KeyboardConfig
/**
* All the key functions.
* KEY_NO_VALUE is used in initialization, and should be unchanged.
- * KEY_MIN and KEY_TOTAL should always be first and last respectively,
- * the bare used in control loops.
- * The third element (after KEY_NO_VALUE and KEY_MIN),
- * should always equal KEY_MIN.
+ * KEY_TOTAL should always be last (used as a conditional in loops).
* The key assignment view gets arranged according to the order of
* these values.
*/