diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-24 13:43:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-24 13:43:46 +0300 |
commit | d0cfc6412b1d931b09d457cac2959b4881136ca4 (patch) | |
tree | 0197fe9cbcceee48c15ba2d009a2f86429703863 /src/gui/setup_touch.cpp | |
parent | 4451d65a33fc5f3de52ea86b27dedc16cd26c5fd (diff) | |
download | mv-d0cfc6412b1d931b09d457cac2959b4881136ca4.tar.gz mv-d0cfc6412b1d931b09d457cac2959b4881136ca4.tar.bz2 mv-d0cfc6412b1d931b09d457cac2959b4881136ca4.tar.xz mv-d0cfc6412b1d931b09d457cac2959b4881136ca4.zip |
Replace sliders to dropdowns in touch setup page.
Diffstat (limited to 'src/gui/setup_touch.cpp')
-rw-r--r-- | src/gui/setup_touch.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/gui/setup_touch.cpp b/src/gui/setup_touch.cpp index e311195b8..1f1d53e0e 100644 --- a/src/gui/setup_touch.cpp +++ b/src/gui/setup_touch.cpp @@ -21,6 +21,7 @@ #include "gui/setup_touch.h" #include "gui/widgets/layouthelper.h" +#include "gui/widgets/namesmodel.h" #include "gui/widgets/scrollarea.h" #include "configuration.h" @@ -29,9 +30,19 @@ #include "debug.h" +static const int sizeListSize = 4; + +static const char *const sizeList[] = +{ + N_("Small"), + N_("Normal"), + N_("Medium"), + N_("Large") +}; + Setup_Touch::Setup_Touch(const Widget2 *const widget) : SetupTabScroll(widget), - mSizeList(new SetupItemNames) + mSizeList(new NamesModel) { setName(_("Touch")); @@ -42,18 +53,15 @@ Setup_Touch::Setup_Touch(const Widget2 *const widget) : new SetupItemCheckBox(_("Show on screen buttons"), "", "showScreenButtons", this, "showScreenButtonsEvent"); - mSizeList->push_back(_("Small")); - mSizeList->push_back(_("Normal")); - mSizeList->push_back(_("Medium")); - mSizeList->push_back(_("Large")); - new SetupItemSlider2(_("Buttons size"), "", "screenButtonsSize", this, - "screenButtonsSizeEvent", 0, 3, mSizeList); + mSizeList->fillFromArray(&sizeList[0], sizeListSize); + new SetupItemDropDown(_("Buttons size"), "", "screenButtonsSize", this, + "screenButtonsSizeEvent", mSizeList, 100); new SetupItemCheckBox(_("Show on screen joystick"), "", "showScreenJoystick", this, "showScreenJoystickEvent"); - new SetupItemSlider2(_("Joystick size"), "", "screenJoystickSize", this, - "screenJoystickEvent", 0, 3, mSizeList); + new SetupItemDropDown(_("Joystick size"), "", "screenJoystickSize", this, + "screenJoystickEvent", mSizeList, 100); setDimension(gcn::Rectangle(0, 0, 550, 350)); } |