summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJoshua Langley <joshlangley[at]optusnet.com.au>2007-07-24 06:39:04 +0000
committerJoshua Langley <joshlangley[at]optusnet.com.au>2007-07-24 06:39:04 +0000
commitdc5d9dee3f3f726d463f5f23f5902d1d0373df93 (patch)
tree3e2a4f4e8f744c846a18fd17710f494dfd1f0711 /src/gui
parent71532a23200b246f63ed1e0dc3d563bd1184b593 (diff)
downloadmana-client-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.tar.gz
mana-client-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.tar.bz2
mana-client-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.tar.xz
mana-client-dc5d9dee3f3f726d463f5f23f5902d1d0373df93.zip
keyboard configuration - mainly documentation fixes.
http://mantis.themanaworld.org/view.php?id=16
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_keyboard.cpp20
-rw-r--r--src/gui/setup_keyboard.h17
2 files changed, 20 insertions, 17 deletions
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp
index 6ca149a5..4cb39494 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_keyboard.cpp
@@ -29,7 +29,6 @@
#include "../configuration.h"
#include "../keyboardconfig.h"
-#include "../log.h"
#include "../utils/tostring.h"
@@ -104,14 +103,13 @@ void Setup_Keyboard::action(const gcn::ActionEvent &event)
{
keyboard.setEnabled(false);
keyboard.setNewKeyIndex(i);
- enableButtons(false);
+ enableSetButtons(false);
mKeyLabel[i].setCaption(keyboard.getKeyCaption(i) + ": ?");
}
}
}
-
-void Setup_Keyboard::enableButtons(bool bValue)
+void Setup_Keyboard::enableSetButtons(bool bValue)
{
for (int i=0; i < keyboard.KEY_TOTAL; i++)
{
@@ -121,17 +119,17 @@ void Setup_Keyboard::enableButtons(bool bValue)
void Setup_Keyboard::refreshAssignedKey(const int index)
{
- char *temp = SDL_GetKeyName(
- (SDLKey) keyboard.getKeyValue(index));
- mKeyLabel[index].setCaption(
- keyboard.getKeyCaption(index) + ": " + toString(temp));
- mKeyLabel[index].adjustSize();
+ char *temp = SDL_GetKeyName(
+ (SDLKey) keyboard.getKeyValue(index));
+ mKeyLabel[index].setCaption(
+ keyboard.getKeyCaption(index) + ": " + toString(temp));
+ mKeyLabel[index].adjustSize();
}
void Setup_Keyboard::newKeyCallback(const int index)
{
refreshAssignedKey(index);
- enableButtons(true);
+ enableSetButtons(true);
}
void Setup_Keyboard::refreshKeys()
@@ -141,5 +139,3 @@ void Setup_Keyboard::refreshKeys()
refreshAssignedKey(i);
}
}
-
-
diff --git a/src/gui/setup_keyboard.h b/src/gui/setup_keyboard.h
index 0430b040..115a2b9a 100644
--- a/src/gui/setup_keyboard.h
+++ b/src/gui/setup_keyboard.h
@@ -35,7 +35,14 @@
class Setup_Keyboard : public SetupTab, public gcn::ActionListener
{
public:
+ /**
+ * Constructor
+ */
Setup_Keyboard();
+
+ /**
+ * Destructor
+ */
~Setup_Keyboard();
void apply();
@@ -44,22 +51,22 @@ class Setup_Keyboard : public SetupTab, public gcn::ActionListener
void action(const gcn::ActionEvent &event);
/**
- * easy way to disable/enable all the set buttons.
+ * Easy way to disable/enable all the set buttons.
*/
- void enableButtons(bool bValue);
+ void enableSetButtons(bool bValue);
/**
- * get an update on the assigned key.
+ * Get an update on the assigned key.
*/
void refreshAssignedKey(const int index);
/**
- * the callback function when a new key has been pressed.
+ * The callback function when a new key has been pressed.
*/
void newKeyCallback(const int index);
/**
- * shorthand method to update all the keys.
+ * Shorthand method to update all the keys.
*/
void refreshKeys();