summaryrefslogtreecommitdiff
path: root/src/input/touch
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-20 14:20:20 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-20 14:20:20 +0300
commit7221f5dd436a8534c6797718f2c83b0fb5f8b136 (patch)
tree762559ebe4fb16a3fcd9dd53b1f141414f07f551 /src/input/touch
parentca790028cb845f56e021fad84bc58d9e251785a4 (diff)
downloadmanaverse-7221f5dd436a8534c6797718f2c83b0fb5f8b136.tar.gz
manaverse-7221f5dd436a8534c6797718f2c83b0fb5f8b136.tar.bz2
manaverse-7221f5dd436a8534c6797718f2c83b0fb5f8b136.tar.xz
manaverse-7221f5dd436a8534c6797718f2c83b0fb5f8b136.zip
Add support for onscreen buttons in format 3x2.
Diffstat (limited to 'src/input/touch')
-rw-r--r--src/input/touch/touchmanager.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/input/touch/touchmanager.cpp b/src/input/touch/touchmanager.cpp
index 85dce0f9a..f9e4ebb8f 100644
--- a/src/input/touch/touchmanager.cpp
+++ b/src/input/touch/touchmanager.cpp
@@ -566,6 +566,30 @@ void TouchManager::loadButtons() restrict2
"screenActionButton0", "");
break;
}
+ // 3x2
+ case 5:
+ {
+ const int pad4 = pad2 * 2;
+ const int skipWidth2 = pad4 + x;
+ loadTouchItem(&mButtons[5], "dbutton.xml", "dbutton_image.xml",
+ "6", x, y, sz, sz, RIGHT, "screenActionButton5", "");
+ loadTouchItem(&mButtons[4], "dbutton.xml", "dbutton_image.xml",
+ "5", skipWidth, y, sz, sz, RIGHT,
+ "screenActionButton4", "");
+ loadTouchItem(&mButtons[3], "dbutton.xml", "dbutton_image.xml",
+ "4", skipWidth2, y, sz, sz, RIGHT,
+ "screenActionButton3", "");
+ loadTouchItem(&mButtons[2], "dbutton.xml", "dbutton_image.xml",
+ "3", x, skipHeight, sz, sz, RIGHT,
+ "screenActionButton2", "");
+ loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
+ "2", skipWidth, skipHeight, sz, sz, RIGHT,
+ "screenActionButton1", "");
+ loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
+ "1", skipWidth2, skipHeight, sz, sz, RIGHT,
+ "screenActionButton0", "");
+ break;
+ }
};
theme->unload(skin);
}