diff options
author | ewewukek <ewewukek@gmail.com> | 2024-01-10 23:17:43 +0300 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-05-14 01:14:04 +0000 |
commit | e0f535979ad9315efbe4a16ab1ad345d9e9a4347 (patch) | |
tree | e2772fb70cdec23bcae2fa86bdcf63ceefb35181 /src/gui/widgets | |
parent | 78f73fbc427d449a9fbfb35461ff22eac309486b (diff) | |
download | manaverse-e0f535979ad9315efbe4a16ab1ad345d9e9a4347.tar.gz manaverse-e0f535979ad9315efbe4a16ab1ad345d9e9a4347.tar.bz2 manaverse-e0f535979ad9315efbe4a16ab1ad345d9e9a4347.tar.xz manaverse-e0f535979ad9315efbe4a16ab1ad345d9e9a4347.zip |
Remove joystick calibration logic
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/tabs/setup_joystick.cpp | 36 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_joystick.h | 2 |
2 files changed, 1 insertions, 37 deletions
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp index 16c248c48..3542f39a5 100644 --- a/src/gui/widgets/tabs/setup_joystick.cpp +++ b/src/gui/widgets/tabs/setup_joystick.cpp @@ -44,12 +44,6 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : SetupTab(widget), - mCalibrateLabel(new Label(this, - // TRANSLATORS: joystick settings tab label - _("Press the button to start calibration"))), - // TRANSLATORS: joystick settings tab button - mCalibrateButton(new Button(this, _("Calibrate"), "calibrate", - BUTTON_SKIN, this)), // TRANSLATORS: joystick settings tab button mDetectButton(new Button(this, _("Detect joysticks"), "detect", BUTTON_SKIN, this)), @@ -76,7 +70,6 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : mJoystickEnabled->setSelected(mOriginalJoystickEnabled); mJoystickEnabled->setActionEventId("joystick"); mJoystickEnabled->addActionListener(this); - mCalibrateButton->setEnabled(mOriginalJoystickEnabled); int tolerance = config.getIntValue("joystickTolerance"); mToleranceSlider->setValue(tolerance); @@ -114,10 +107,8 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) : place(0, 3, mUseInactiveCheckBox, 1, 1); place(0, 4, mDetectButton, 1, 1); - place(0, 5, mCalibrateLabel, 1, 1); - place(0, 6, mCalibrateButton, 1, 1); - setDimension(Rect(0, 0, 365, 95)); + setDimension(Rect(0, 0, 365, 60)); } Setup_Joystick::~Setup_Joystick() @@ -152,36 +143,11 @@ void Setup_Joystick::action(const ActionEvent &event) else mNamesDropDown->setSelected(0); } - else - { - if (joystick == nullptr) - return; - - if (joystick->isCalibrating()) - { - // TRANSLATORS: joystick settings tab button - mCalibrateButton->setCaption(_("Calibrate")); - mCalibrateLabel->setCaption - // TRANSLATORS: joystick settings tab label - (_("Press the button to start calibration")); - joystick->finishCalibration(); - } - else - { - // TRANSLATORS: joystick settings tab button - mCalibrateButton->setCaption(_("Stop")); - mCalibrateLabel->setCaption( - // TRANSLATORS: joystick settings tab label - _("Rotate the stick and don't press buttons")); - joystick->startCalibration(); - } - } } void Setup_Joystick::setTempEnabled(const bool sel) { Joystick::setEnabled(sel); - mCalibrateButton->setEnabled(sel); if (joystick != nullptr) { if (sel) diff --git a/src/gui/widgets/tabs/setup_joystick.h b/src/gui/widgets/tabs/setup_joystick.h index 8e347d0f6..fce59a02c 100644 --- a/src/gui/widgets/tabs/setup_joystick.h +++ b/src/gui/widgets/tabs/setup_joystick.h @@ -51,8 +51,6 @@ class Setup_Joystick final : public SetupTab void setTempEnabled(const bool sel); private: - Label *mCalibrateLabel A_NONNULLPOINTER; - Button *mCalibrateButton A_NONNULLPOINTER; Button *mDetectButton A_NONNULLPOINTER; CheckBox *mJoystickEnabled A_NONNULLPOINTER; NamesModel *mNamesModel A_NONNULLPOINTER; |