This commit is contained in:
2025-03-22 23:30:52 +01:00
parent 6b16abda6a
commit 9780a36af4
18 changed files with 114 additions and 29 deletions

View File

@@ -8,14 +8,14 @@
#include <SFML/Graphics.hpp>
MainAppMenu::MainAppMenu(std::shared_ptr<std::stack<AppMenu>> menuStack, std::shared_ptr<Settings> settings, std::shared_ptr<sf::RenderWindow> renderWindow) :
MainAppMenu::MainAppMenu(std::shared_ptr<MenuStack> menuStack, std::shared_ptr<Settings> settings, std::shared_ptr<sf::RenderWindow> renderWindow) :
AppMenu(menuStack, settings, renderWindow) {
}
void MainAppMenu::computeFrame() {
if (sf::Keyboard::isKeyPressed(sfKey::Enter)) {
this->menuStack->push(InGameAppMenu(this->menuStack, this->settings, this->renderWindow));
this->menuStack->push(std::make_shared<InGameAppMenu>(this->menuStack, this->settings, this->renderWindow));
}
else if (sf::Keyboard::isKeyPressed(sfKey::Escape)) {
this->menuStack->pop();