diff options
author | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-07-24 06:39:04 +0000 |
---|---|---|
committer | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-07-24 06:39:04 +0000 |
commit | dc5d9dee3f3f726d463f5f23f5902d1d0373df93 (patch) | |
tree | 3e2a4f4e8f744c846a18fd17710f494dfd1f0711 /src/keyboardconfig.cpp | |
parent | 71532a23200b246f63ed1e0dc3d563bd1184b593 (diff) | |
download | mana-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.tar.gz mana-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.tar.bz2 mana-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.tar.xz mana-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.zip |
keyboard configuration - mainly documentation fixes.
http://mantis.themanaworld.org/view.php?id=16
Diffstat (limited to 'src/keyboardconfig.cpp')
-rw-r--r-- | src/keyboardconfig.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index 3185a58a..5cce793a 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -28,11 +28,6 @@ #include "gui/setup_keyboard.h"
-void KeyboardConfig::destroy()
-{
-
-}
-
void KeyboardConfig::init()
{
mKey[KEY_MOVE_UP] = KeyFunction("keyMoveUp", SDLK_UP, "Move Up");
@@ -44,7 +39,7 @@ void KeyboardConfig::init() mKey[KEY_ATTACK] = KeyFunction("keyAttack", SDLK_LCTRL, "Attack");
mKey[KEY_TARGET] = KeyFunction("keyTarget", SDLK_LSHIFT, "Target");
mKey[KEY_TARGET_CLOSEST] =
- KeyFunction("mKeyTargetClosest", SDLK_a, "Target Closest");
+ KeyFunction("keyTargetClosest", SDLK_a, "Target Closest");
mKey[KEY_PICKUP] = KeyFunction("keyPickup", SDLK_z, "Pickup");
mKey[KEY_HIDE_WINDOWS] =
KeyFunction("keyHideWindows", SDLK_h, "Hide Windows");
@@ -60,6 +55,13 @@ void KeyboardConfig::init() retrieve();
}
+void KeyboardConfig::destroy()
+{
+ store();
+
+ delete [] mActiveKeys;
+}
+
void KeyboardConfig::retrieve()
{
for (int i = 0; i < KEY_TOTAL; i++)
@@ -103,7 +105,7 @@ bool KeyboardConfig::hasConflicts() void KeyboardConfig::callbackNewKey()
{
- mSetupKey->newKeyCallback((const int) mNewKeyIndex);
+ mSetupKey->newKeyCallback(mNewKeyIndex);
}
int KeyboardConfig::getKeyIndex(const int keyValue) const
@@ -120,7 +122,7 @@ int KeyboardConfig::getKeyIndex(const int keyValue) const bool KeyboardConfig::isKeyActive(int index)
{
- return mActiveKeys[mKey[index].value];
+ return mActiveKeys[ mKey[index].value];
}
void KeyboardConfig::refreshActiveKeys()
|