summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-27 19:31:10 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-27 19:31:10 +0300
commitb5760b82e84707f5c8f3ccadbf6c2f80c46fc5c1 (patch)
tree2654ba7a55ea5b264fcdc243b3c2a0be9f7254e6 /src/input
parent1614644f5367a7a17fb5bc754b1ee47561d5905b (diff)
downloadmanaverse-b5760b82e84707f5c8f3ccadbf6c2f80c46fc5c1.tar.gz
manaverse-b5760b82e84707f5c8f3ccadbf6c2f80c46fc5c1.tar.bz2
manaverse-b5760b82e84707f5c8f3ccadbf6c2f80c46fc5c1.tar.xz
manaverse-b5760b82e84707f5c8f3ccadbf6c2f80c46fc5c1.zip
Remove default parameters from touchmanager.
Diffstat (limited to 'src/input')
-rw-r--r--src/input/touch/touchmanager.cpp126
-rw-r--r--src/input/touch/touchmanager.h8
2 files changed, 88 insertions, 46 deletions
diff --git a/src/input/touch/touchmanager.cpp b/src/input/touch/touchmanager.cpp
index ec2d71760..dda8cf938 100644
--- a/src/input/touch/touchmanager.cpp
+++ b/src/input/touch/touchmanager.cpp
@@ -452,26 +452,32 @@ void TouchManager::loadButtons() restrict2
default:
{
loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
- "2", x, y, sz, sz, RIGHT, "screenActionButton1", "");
+ "2", x, y, sz, sz, RIGHT, "screenActionButton1", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
"1", skipWidth, y, sz, sz, RIGHT,
- "screenActionButton0", "");
+ "screenActionButton0", "",
+ nullptr, nullptr, nullptr, nullptr);
break;
}
// 2x2
case 1:
{
loadTouchItem(&mButtons[3], "dbutton.xml", "dbutton_image.xml",
- "4", x, y, sz, sz, RIGHT, "screenActionButton3", "");
+ "4", x, y, sz, sz, RIGHT, "screenActionButton3", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[2], "dbutton.xml", "dbutton_image.xml",
"3", skipWidth, y, sz, sz, RIGHT,
- "screenActionButton2", "");
+ "screenActionButton2", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
"2", x, skipHeight, sz, sz, RIGHT,
- "screenActionButton1", "");
+ "screenActionButton1", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
"1", skipWidth, skipHeight, sz, sz, RIGHT,
- "screenActionButton0", "");
+ "screenActionButton0", "",
+ nullptr, nullptr, nullptr, nullptr);
break;
}
// 3x3
@@ -481,31 +487,40 @@ void TouchManager::loadButtons() restrict2
const int skipWidth2 = pad4 + x;
const int skipHeight2 = pad4 + y;
loadTouchItem(&mButtons[8], "dbutton.xml", "dbutton_image.xml",
- "9", x, y, sz, sz, RIGHT, "screenActionButton8", "");
+ "9", x, y, sz, sz, RIGHT, "screenActionButton8", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[7], "dbutton.xml", "dbutton_image.xml",
"8", skipWidth, y, sz, sz, RIGHT,
- "screenActionButton7", "");
+ "screenActionButton7", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[6], "dbutton.xml", "dbutton_image.xml",
"7", skipWidth2, y, sz, sz, RIGHT,
- "screenActionButton6", "");
+ "screenActionButton6", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[5], "dbutton.xml", "dbutton_image.xml",
"6", x, skipHeight, sz, sz, RIGHT,
- "screenActionButton5", "");
+ "screenActionButton5", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[4], "dbutton.xml", "dbutton_image.xml",
"5", skipWidth, skipHeight, sz, sz, RIGHT,
- "screenActionButton4", "");
+ "screenActionButton4", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[3], "dbutton.xml", "dbutton_image.xml",
"4", skipWidth2, skipHeight, sz, sz, RIGHT,
- "screenActionButton3", "");
+ "screenActionButton3", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[2], "dbutton.xml", "dbutton_image.xml",
"3", x, skipHeight2, sz, sz, RIGHT,
- "screenActionButton2", "");
+ "screenActionButton2", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
"2", skipWidth, skipHeight2, sz, sz, RIGHT,
- "screenActionButton1", "");
+ "screenActionButton1", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
"1", skipWidth2, skipHeight2, sz, sz, RIGHT,
- "screenActionButton0", "");
+ "screenActionButton0", "",
+ nullptr, nullptr, nullptr, nullptr);
break;
}
// 4x2
@@ -514,28 +529,36 @@ void TouchManager::loadButtons() restrict2
const int skipWidth2 = pad2 * 2 + x;
const int skipWidth3 = pad2 * 3 + x;
loadTouchItem(&mButtons[7], "dbutton.xml", "dbutton_image.xml",
- "8", x, y, sz, sz, RIGHT, "screenActionButton7", "");
+ "8", x, y, sz, sz, RIGHT, "screenActionButton7", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[6], "dbutton.xml", "dbutton_image.xml",
"7", skipWidth, y, sz, sz, RIGHT,
- "screenActionButton6", "");
+ "screenActionButton6", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[5], "dbutton.xml", "dbutton_image.xml",
"6", skipWidth2, y, sz, sz, RIGHT,
- "screenActionButton5", "");
+ "screenActionButton5", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[4], "dbutton.xml", "dbutton_image.xml",
"5", skipWidth3, y, sz, sz, RIGHT,
- "screenActionButton4", "");
+ "screenActionButton4", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[3], "dbutton.xml", "dbutton_image.xml",
"4", x, skipHeight, sz, sz, RIGHT,
- "screenActionButton3", "");
+ "screenActionButton3", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[2], "dbutton.xml", "dbutton_image.xml",
"3", skipWidth, skipHeight, sz, sz, RIGHT,
- "screenActionButton2", "");
+ "screenActionButton2", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
"2", skipWidth2, skipHeight, sz, sz, RIGHT,
- "screenActionButton1", "");
+ "screenActionButton1", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
"1", skipWidth3, skipHeight, sz, sz, RIGHT,
- "screenActionButton0", "");
+ "screenActionButton0", "",
+ nullptr, nullptr, nullptr, nullptr);
break;
}
// 4x3
@@ -546,40 +569,52 @@ void TouchManager::loadButtons() restrict2
const int skipHeight2 = pad2 * 2 + y;
loadTouchItem(&mButtons[11], "dbutton.xml",
"dbutton_image.xml", "12", x, y, sz, sz, RIGHT,
- "screenActionButton11", "");
+ "screenActionButton11", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[10], "dbutton.xml",
"dbutton_image.xml", "11", skipWidth, y, sz, sz, RIGHT,
- "screenActionButton10", "");
+ "screenActionButton10", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[9], "dbutton.xml", "dbutton_image.xml",
"10", skipWidth2, y, sz, sz, RIGHT,
- "screenActionButton9", "");
+ "screenActionButton9", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[8], "dbutton.xml", "dbutton_image.xml",
"9", skipWidth3, y, sz, sz, RIGHT,
- "screenActionButton8", "");
+ "screenActionButton8", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[7], "dbutton.xml", "dbutton_image.xml",
"8", x, skipHeight, sz, sz, RIGHT,
- "screenActionButton7", "");
+ "screenActionButton7", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[6], "dbutton.xml", "dbutton_image.xml",
"7", skipWidth, skipHeight, sz, sz, RIGHT,
- "screenActionButton6", "");
+ "screenActionButton6", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[5], "dbutton.xml", "dbutton_image.xml",
"6", skipWidth2, skipHeight, sz, sz, RIGHT,
- "screenActionButton5", "");
+ "screenActionButton5", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[4], "dbutton.xml", "dbutton_image.xml",
"5", skipWidth3, skipHeight, sz, sz, RIGHT,
- "screenActionButton4", "");
+ "screenActionButton4", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[3], "dbutton.xml", "dbutton_image.xml",
"4", x, skipHeight2, sz, sz, RIGHT,
- "screenActionButton3", "");
+ "screenActionButton3", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[2], "dbutton.xml", "dbutton_image.xml",
"3", skipWidth, skipHeight2, sz, sz, RIGHT,
- "screenActionButton2", "");
+ "screenActionButton2", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
"2", skipWidth2, skipHeight2, sz, sz, RIGHT,
- "screenActionButton1", "");
+ "screenActionButton1", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
"1", skipWidth3, skipHeight2, sz, sz, RIGHT,
- "screenActionButton0", "");
+ "screenActionButton0", "",
+ nullptr, nullptr, nullptr, nullptr);
break;
}
// 3x2
@@ -588,22 +623,28 @@ void TouchManager::loadButtons() restrict2
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", "");
+ "6", x, y, sz, sz, RIGHT, "screenActionButton5", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[4], "dbutton.xml", "dbutton_image.xml",
"5", skipWidth, y, sz, sz, RIGHT,
- "screenActionButton4", "");
+ "screenActionButton4", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[3], "dbutton.xml", "dbutton_image.xml",
"4", skipWidth2, y, sz, sz, RIGHT,
- "screenActionButton3", "");
+ "screenActionButton3", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[2], "dbutton.xml", "dbutton_image.xml",
"3", x, skipHeight, sz, sz, RIGHT,
- "screenActionButton2", "");
+ "screenActionButton2", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[1], "dbutton.xml", "dbutton_image.xml",
"2", skipWidth, skipHeight, sz, sz, RIGHT,
- "screenActionButton1", "");
+ "screenActionButton1", "",
+ nullptr, nullptr, nullptr, nullptr);
loadTouchItem(&mButtons[0], "dbutton.xml", "dbutton_image.xml",
"1", skipWidth2, skipHeight, sz, sz, RIGHT,
- "screenActionButton0", "");
+ "screenActionButton0", "",
+ nullptr, nullptr, nullptr, nullptr);
break;
}
};
@@ -614,7 +655,8 @@ void TouchManager::loadButtons() restrict2
void TouchManager::loadKeyboard() restrict2
{
loadTouchItem(&mKeyboard, "keyboard_icon.xml", "", "", -1, -1, 28, 28,
- NORMAL, "", "screenActionKeyboard");
+ NORMAL, "", "screenActionKeyboard",
+ nullptr, nullptr, nullptr, nullptr);
}
void TouchManager::optionChanged(const std::string &value) restrict2
diff --git a/src/input/touch/touchmanager.h b/src/input/touch/touchmanager.h
index 0b9187968..c80699177 100644
--- a/src/input/touch/touchmanager.h
+++ b/src/input/touch/touchmanager.h
@@ -125,10 +125,10 @@ class TouchManager final : public ConfigListener
const int type,
const std::string &restrict eventPressed,
const std::string &restrict eventReleased,
- const TouchFuncPtr fAll = nullptr,
- const TouchFuncPtr fPressed = nullptr,
- const TouchFuncPtr fReleased = nullptr,
- const TouchFuncPtr fOut = nullptr)
+ const TouchFuncPtr fAll,
+ const TouchFuncPtr fPressed,
+ const TouchFuncPtr fReleased,
+ const TouchFuncPtr fOut)
restrict2 A_NONNULL(2);
void clear() restrict2;