summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-09 19:51:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-09 21:03:32 +0300
commit351b7cf1ff682026485b0e7a8f7623fe356cdf84 (patch)
tree69e4863afbcf3bddf19affecb53ad0205e3f45a3 /src/gui
parentb43ed947efd36471a0608d103faed95e61f7b124 (diff)
downloadplus-351b7cf1ff682026485b0e7a8f7623fe356cdf84.tar.gz
plus-351b7cf1ff682026485b0e7a8f7623fe356cdf84.tar.bz2
plus-351b7cf1ff682026485b0e7a8f7623fe356cdf84.tar.xz
plus-351b7cf1ff682026485b0e7a8f7623fe356cdf84.zip
Add resize options for on screen joystick and buttons.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_touch.cpp15
-rw-r--r--src/gui/setup_touch.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/setup_touch.cpp b/src/gui/setup_touch.cpp
index e46ff0d73..e311195b8 100644
--- a/src/gui/setup_touch.cpp
+++ b/src/gui/setup_touch.cpp
@@ -30,7 +30,8 @@
#include "debug.h"
Setup_Touch::Setup_Touch(const Widget2 *const widget) :
- SetupTabScroll(widget)
+ SetupTabScroll(widget),
+ mSizeList(new SetupItemNames)
{
setName(_("Touch"));
@@ -41,12 +42,24 @@ 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);
+
new SetupItemCheckBox(_("Show on screen joystick"), "",
"showScreenJoystick", this, "showScreenJoystickEvent");
+ new SetupItemSlider2(_("Joystick size"), "", "screenJoystickSize", this,
+ "screenJoystickEvent", 0, 3, mSizeList);
+
setDimension(gcn::Rectangle(0, 0, 550, 350));
}
Setup_Touch::~Setup_Touch()
{
+ delete mSizeList;
+ mSizeList = nullptr;
}
diff --git a/src/gui/setup_touch.h b/src/gui/setup_touch.h
index ef677f214..f0d574bdd 100644
--- a/src/gui/setup_touch.h
+++ b/src/gui/setup_touch.h
@@ -38,6 +38,7 @@ class Setup_Touch final : public SetupTabScroll
~Setup_Touch();
protected:
+ SetupItemNames *mSizeList;
};
#endif