ajout menu info

This commit is contained in:
2025-03-26 00:39:39 +01:00
parent b2567844fc
commit 009ed8edc3
6 changed files with 117 additions and 8 deletions

View File

@@ -3,12 +3,12 @@
#include "AppMenu.h"
#include "GameSettingsAppMenu.h"
#include "SettingsMainAppMenu.h"
#include "InfoAppMenu.h"
#include "../PlayerCursor.h"
#include <stack>
#include <memory>
#include <vector>
#include <optional>
#include <SFML/Graphics.hpp>
@@ -30,7 +30,7 @@ void MainAppMenu::computeFrame() {
this->menuStack->push(std::make_shared<SettingsMainAppMenu>(this->menuStack, this->settings, this->renderWindow));
}
if (this->playerCursor.getPosition().y == 2) {
//TODO
this->menuStack->push(std::make_shared<InfoAppMenu>(this->menuStack, this->settings, this->renderWindow));
}
}
if (this->escReleased) {
@@ -41,8 +41,6 @@ void MainAppMenu::computeFrame() {
void MainAppMenu::drawFrame() const {
this->renderWindow->clear(sf::Color(200, 200, 200));
float sizeMultiplier = this->settings->getWindowSizeMultiplier();
sf::Text text(this->pressStartFont, "", this->settings->getWindowSizeMultiplier() * 2);
text.setFillColor(sf::Color(0, 0, 0));
text.setOutlineColor(sf::Color(255, 255, 255));
@@ -51,7 +49,7 @@ void MainAppMenu::drawFrame() const {
this->placeTitle(text, this->playerCursor, "PLAY", 20.f, sf::Vector2u{0, 0});
this->placeTitle(text, this->playerCursor, "SETTINGS", 30.f, sf::Vector2u{0, 1});
this->placeTitle(text, this->playerCursor, "INFO (TODO)", 40.f, sf::Vector2u{0, 2});
this->placeTitle(text, this->playerCursor, "INFO", 40.f, sf::Vector2u{0, 2});
this->renderWindow->display();
}