Working on UI and web game

This commit is contained in:
Vladislav Khorev committed 2026-03-01 21:22:57 +03:00
1 parent 6b4b549b3c
commit bb0f584bf6
15 files changed
+566 -382

No files matched your search

+6 -4
View File
@@ -96,6 +96,7 @@ namespace ZL {
}
});
uiManager.setButtonCallback("shootButton", [this](const std::string& name) {
onFirePressed();
});
@@ -103,6 +104,7 @@ namespace ZL {
onFirePressed();
});
uiManager.setSliderCallback("velocitySlider", [this](const std::string& name, float value) {
int newVel = roundf(value * 10);
if (newVel > 2)
{
@@ -183,8 +185,8 @@ namespace ZL {
}
});
uiManager.setButtonCallback("multiplayerButton2", [this, shipSelectionRoot, loadGameplayUI](const std::string& name) {
/*std::cerr << "Multiplayer button pressed → opening multiplayer menu\n";
/*uiManager.setButtonCallback("multiplayerButton2", [this, shipSelectionRoot, loadGameplayUI](const std::string& name) {
std::cerr << "Multiplayer button pressed → opening multiplayer menu\n";
uiManager.startAnimationOnNode("playButton", "buttonsExit");
uiManager.startAnimationOnNode("settingsButton", "buttonsExit");
@@ -219,7 +221,7 @@ namespace ZL {
}
else {
std::cerr << "Failed to load multiplayer menu\n";
}*/
}
std::cerr << "Single button pressed: " << name << " -> open ship selection UI\n";
if (!shipSelectionRoot) {
std::cerr << "Failed to load ship selection UI\n";
@@ -255,7 +257,7 @@ namespace ZL {
uiManager.setButtonCallback("exitButton", [](const std::string& name) {
std::cerr << "Exit from main menu pressed: " << name << " -> exiting\n";
Environment::exitGameLoop = true;
});
});*/
}
void MenuManager::showGameOver(int score)