From dc5d9dee3f3f726d463f5f23f5902d1d0373df93 Mon Sep 17 00:00:00 2001 From: Joshua Langley Date: Tue, 24 Jul 2007 06:39:04 +0000 Subject: keyboard configuration - mainly documentation fixes. http://mantis.themanaworld.org/view.php?id=16 --- src/gui/setup_keyboard.cpp | 20 ++++++++------------ src/gui/setup_keyboard.h | 17 ++++++++++++----- 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src/gui') 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(); -- cgit v1.2.3-70-g09d2