Added multi-touch, added on press down
This commit is contained in:
1 parent
a06cb77a66
commit
4a542fd6c8
7 files changed
+137
-79
No files matched your search
+4
-4
@@ -143,18 +143,18 @@ namespace ZL {
|
||||
|
||||
uiManager.startAnimationOnNode("backgroundNode", "bgScroll");
|
||||
|
||||
uiManager.setButtonCallback("shootButton", [this](const std::string&) {
|
||||
uiManager.setButtonPressCallback("shootButton", [this](const std::string&) {
|
||||
if (onFirePressed) onFirePressed();
|
||||
});
|
||||
uiManager.setButtonCallback("shootButton2", [this](const std::string&) {
|
||||
uiManager.setButtonPressCallback("shootButton2", [this](const std::string&) {
|
||||
if (onFirePressed) onFirePressed();
|
||||
});
|
||||
uiManager.setButtonCallback("plusButton", [this](const std::string&) {
|
||||
uiManager.setButtonPressCallback("plusButton", [this](const std::string&) {
|
||||
int newVel = Environment::shipState.selectedVelocity + 1;
|
||||
if (newVel > 4) newVel = 4;
|
||||
if (onVelocityChanged) onVelocityChanged(newVel);
|
||||
});
|
||||
uiManager.setButtonCallback("minusButton", [this](const std::string&) {
|
||||
uiManager.setButtonPressCallback("minusButton", [this](const std::string&) {
|
||||
int newVel = Environment::shipState.selectedVelocity - 1;
|
||||
if (newVel < 0) newVel = 0;
|
||||
if (onVelocityChanged) onVelocityChanged(newVel);
|
||||
|
||||
Reference in new issue
Block a user