diff options
author | David Athay <ko2fan@gmail.com> | 2009-02-11 09:30:26 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-02-11 09:30:26 +0000 |
commit | 91111ca5d13072ea3b834e23835df9c077329e39 (patch) | |
tree | f0af8dd08b766164835cf9b5412a9aa3267dbad7 /src/gui/setup_joystick.cpp | |
parent | 8046bb2626b30fecdcea54eb0aa3349cdb7d277b (diff) | |
parent | 63ac001daa7dfc0735dfefd9c2829c8786b4edaf (diff) | |
download | mana-client-91111ca5d13072ea3b834e23835df9c077329e39.tar.gz mana-client-91111ca5d13072ea3b834e23835df9c077329e39.tar.bz2 mana-client-91111ca5d13072ea3b834e23835df9c077329e39.tar.xz mana-client-91111ca5d13072ea3b834e23835df9c077329e39.zip |
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/gui/setup_joystick.cpp')
-rw-r--r-- | src/gui/setup_joystick.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/setup_joystick.cpp b/src/gui/setup_joystick.cpp index f8fc194f..2ebcdbde 100644 --- a/src/gui/setup_joystick.cpp +++ b/src/gui/setup_joystick.cpp @@ -19,12 +19,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "setup_joystick.h" - #include <guichan/widgets/label.hpp> #include "button.h" #include "checkbox.h" +#include "setup_joystick.h" #include "widgets/layouthelper.h" @@ -42,7 +41,7 @@ Setup_Joystick::Setup_Joystick(): { setOpaque(false); - mOriginalJoystickEnabled = (int)config.getValue("joystickEnabled", 0) != 0; + mOriginalJoystickEnabled = !config.getValue("joystickEnabled", false); mJoystickEnabled->setSelected(mOriginalJoystickEnabled); mJoystickEnabled->addActionListener(this); @@ -62,7 +61,8 @@ Setup_Joystick::Setup_Joystick(): void Setup_Joystick::action(const gcn::ActionEvent &event) { - if (!joystick) { + if (!joystick) + { return; } @@ -72,12 +72,15 @@ void Setup_Joystick::action(const gcn::ActionEvent &event) } else { - if (joystick->isCalibrating()) { + if (joystick->isCalibrating()) + { mCalibrateButton->setCaption(_("Calibrate")); mCalibrateLabel->setCaption (_("Press the button to start calibration")); joystick->finishCalibration(); - } else { + } + else + { mCalibrateButton->setCaption(_("Stop")); mCalibrateLabel->setCaption(_("Rotate the stick")); joystick->startCalibration(); |