summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-01 01:13:26 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-01 01:13:26 +0300
commit05e6289b28c26df11b38a71e737017d64d22b029 (patch)
treedd649b8ffe10fab5c5bb777381fb0491cb1c9f72 /src/gui
parent82ace39b426a843382a6a809e7b66487c1412494 (diff)
downloadmv-05e6289b28c26df11b38a71e737017d64d22b029.tar.gz
mv-05e6289b28c26df11b38a71e737017d64d22b029.tar.bz2
mv-05e6289b28c26df11b38a71e737017d64d22b029.tar.xz
mv-05e6289b28c26df11b38a71e737017d64d22b029.zip
Allow select differnt modes for on screen buttons.
Now supported 2x1 and 2x2 modes.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_touch.cpp17
-rw-r--r--src/gui/setup_touch.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/setup_touch.cpp b/src/gui/setup_touch.cpp
index 744be43d7..5aea8388d 100644
--- a/src/gui/setup_touch.cpp
+++ b/src/gui/setup_touch.cpp
@@ -37,9 +37,18 @@ static const char *const sizeList[] =
N_("Large")
};
+static const int formatListSize = 2;
+
+static const char *const formatList[] =
+{
+ "2x1",
+ "2x2",
+};
+
Setup_Touch::Setup_Touch(const Widget2 *const widget) :
SetupTabScroll(widget),
mSizeList(new NamesModel),
+ mFormatList(new NamesModel),
mActionsList(new TouchActionsModel)
{
setName(_("Touch"));
@@ -48,6 +57,7 @@ Setup_Touch::Setup_Touch(const Widget2 *const widget) :
ContainerPlacer place = h.getPlacer(0, 0);
place(0, 0, mScroll, 10, 10);
mSizeList->fillFromArray(&sizeList[0], sizeListSize);
+ mFormatList->fillFromArray(&formatList[0], formatListSize);
new SetupItemLabel(_("Onscreen keyboard"), "", this);
@@ -73,6 +83,9 @@ Setup_Touch::Setup_Touch(const Widget2 *const widget) :
new SetupItemCheckBox(_("Show onscreen buttons"), "",
"showScreenButtons", this, "showScreenButtonsEvent");
+ new SetupItemDropDown(_("Buttons format"), "", "screenButtonsFormat", this,
+ "screenButtonsFormatEvent", mFormatList, 100);
+
new SetupItemDropDown(_("Buttons size"), "", "screenButtonsSize", this,
"screenButtonsSizeEvent", mSizeList, 100);
@@ -91,4 +104,8 @@ Setup_Touch::~Setup_Touch()
{
delete mSizeList;
mSizeList = nullptr;
+ delete mFormatList;
+ mFormatList = nullptr;
+ delete mActionsList;
+ mActionsList = nullptr;
}
diff --git a/src/gui/setup_touch.h b/src/gui/setup_touch.h
index 2dc270abf..444006f48 100644
--- a/src/gui/setup_touch.h
+++ b/src/gui/setup_touch.h
@@ -39,6 +39,7 @@ class Setup_Touch final : public SetupTabScroll
protected:
NamesModel *mSizeList;
+ NamesModel *mFormatList;
TouchActionsModel *mActionsList;
};