diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-01 01:13:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-01 01:13:26 +0300 |
commit | 05e6289b28c26df11b38a71e737017d64d22b029 (patch) | |
tree | dd649b8ffe10fab5c5bb777381fb0491cb1c9f72 /src/gui/setup_touch.cpp | |
parent | 82ace39b426a843382a6a809e7b66487c1412494 (diff) | |
download | manaplus-05e6289b28c26df11b38a71e737017d64d22b029.tar.gz manaplus-05e6289b28c26df11b38a71e737017d64d22b029.tar.bz2 manaplus-05e6289b28c26df11b38a71e737017d64d22b029.tar.xz manaplus-05e6289b28c26df11b38a71e737017d64d22b029.zip |
Allow select differnt modes for on screen buttons.
Now supported 2x1 and 2x2 modes.
Diffstat (limited to 'src/gui/setup_touch.cpp')
-rw-r--r-- | src/gui/setup_touch.cpp | 17 |
1 files changed, 17 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; } |