This commit is contained in:
Vladislav Khorev committed 2026-02-28 13:33:33 +03:00
commit 7e5aa22fee
10 files changed
+93 -30

No files matched your search

+6 -3
View File
@@ -38,7 +38,7 @@ namespace ZL {
uiManager.startAnimationOnNode("backgroundNode", "bgScroll");
static bool isExitButtonAnimating = false;
uiManager.setAnimationCallback("settingsButton", "buttonsExit", [this]() {
std::cerr << "Settings button animation finished -> переход в настройки" << std::endl;
std::cerr << "Settings button animation finished -> ??????? ? ?????????" << std::endl;
if (uiManager.pushMenuFromSavedRoot(settingsSavedRoot)) {
uiManager.setButtonCallback("Opt1", [this](const std::string& n) {
std::cerr << "Opt1 pressed: " << n << std::endl;
@@ -258,14 +258,17 @@ namespace ZL {
});
}
void MenuManager::showGameOver()
void MenuManager::showGameOver(int score)
{
if (!uiGameOverShown) {
if (uiManager.pushMenuFromSavedRoot(gameOverSavedRoot)) {
uiManager.setText("scoreText", std::string("Score: ") + std::to_string(score));
uiManager.setButtonCallback("restartButton", [this](const std::string& name) {
uiManager.setText("scoreText", "");
uiGameOverShown = false;
uiManager.popMenu();
onRestartPressed();
if (onRestartPressed) onRestartPressed();
});
uiManager.setButtonCallback("gameOverExitButton", [this](const std::string& name) {