Added multi-touch, added on press down

This commit is contained in:
Vladislav Khorev committed 2026-03-07 22:41:25 +03:00
1 parent a06cb77a66
commit 4a542fd6c8
7 files changed
+137 -79

No files matched your search

+4 -4
View File
@@ -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);