From 05e6289b28c26df11b38a71e737017d64d22b029 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 1 Jan 2013 01:13:26 +0300 Subject: Allow select differnt modes for on screen buttons. Now supported 2x1 and 2x2 modes. --- src/gui/setup_touch.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/gui/setup_touch.cpp') 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; } -- cgit v1.2.3-60-g2f50