summaryrefslogtreecommitdiff
path: root/src/gui/setup_touch.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-31 18:57:56 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-31 18:57:56 +0300
commit6fbb71142de5b2b12c2153b41a21b6dc34284343 (patch)
tree408d3671ac75bd349f86e13ae614bf838672fffe /src/gui/setup_touch.cpp
parent021fa9fe787fe4dd1a6d97b77e94400fac179f23 (diff)
downloadplus-6fbb71142de5b2b12c2153b41a21b6dc34284343.tar.gz
plus-6fbb71142de5b2b12c2153b41a21b6dc34284343.tar.bz2
plus-6fbb71142de5b2b12c2153b41a21b6dc34284343.tar.xz
plus-6fbb71142de5b2b12c2153b41a21b6dc34284343.zip
Add configurable actions for onscreen buttons.
Diffstat (limited to 'src/gui/setup_touch.cpp')
-rw-r--r--src/gui/setup_touch.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/gui/setup_touch.cpp b/src/gui/setup_touch.cpp
index 719b6277a..bd8214232 100644
--- a/src/gui/setup_touch.cpp
+++ b/src/gui/setup_touch.cpp
@@ -49,16 +49,19 @@ Setup_Touch::Setup_Touch(const Widget2 *const widget) :
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
place(0, 0, mScroll, 10, 10);
+ mSizeList->fillFromArray(&sizeList[0], sizeListSize);
+
+ new SetupItemLabel(_("Onscreen keyboard"), "", this);
new SetupItemCheckBox(_("Show onscreen keyboard icon"), "",
"showScreenKeyboard", this, "showScreenKeyboardEvent");
- new SetupItemCheckBox(_("Show onscreen buttons"), "",
- "showScreenButtons", this, "showScreenButtonsEvent");
+ new SetupActionDropDown(_("Keyboard icon action"), "",
+ "screenActionKeyboard", this, "screenActionKeyboardEvent",
+ mActionsList, 250);
- mSizeList->fillFromArray(&sizeList[0], sizeListSize);
- new SetupItemDropDown(_("Buttons size"), "", "screenButtonsSize", this,
- "screenButtonsSizeEvent", mSizeList, 100);
+
+ new SetupItemLabel(_("Onscreen joystick"), "", this);
new SetupItemCheckBox(_("Show onscreen joystick"), "",
"showScreenJoystick", this, "showScreenJoystickEvent");
@@ -66,8 +69,21 @@ Setup_Touch::Setup_Touch(const Widget2 *const widget) :
new SetupItemDropDown(_("Joystick size"), "", "screenJoystickSize", this,
"screenJoystickEvent", mSizeList, 100);
- new SetupActionDropDown(_("Keyboard icon action"), "",
- "screenActionKeyboard", this, "screenActionKeyboardEvent",
+
+ new SetupItemLabel(_("Onscreen buttons"), "", this);
+
+ new SetupItemCheckBox(_("Show onscreen buttons"), "",
+ "showScreenButtons", this, "showScreenButtonsEvent");
+
+ new SetupItemDropDown(_("Buttons size"), "", "screenButtonsSize", this,
+ "screenButtonsSizeEvent", mSizeList, 100);
+
+ new SetupActionDropDown(strprintf(_("Button %u action"), 1), "",
+ "screenActionButton0", this, "screenActionButton0Event",
+ mActionsList, 250);
+
+ new SetupActionDropDown(strprintf(_("Button %u action"), 2), "",
+ "screenActionButton1", this, "screenActionButton1Event",
mActionsList, 250);
setDimension(gcn::Rectangle(0, 0, 550, 350));