omg on a un deuxième menu
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include "MainAppMenu.h"
|
||||
|
||||
#include "AppMenu.h"
|
||||
#include "InGameAppMenu.h"
|
||||
#include "GameSettingsAppMenu.h"
|
||||
#include "PlayerCursor.h"
|
||||
|
||||
#include <stack>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
|
||||
@@ -20,7 +22,13 @@ void MainAppMenu::computeFrame() {
|
||||
|
||||
if (this->enterReleased) {
|
||||
if (this->playerCursor.getPosition().y == 0) {
|
||||
this->menuStack->push(std::make_shared<InGameAppMenu>(this->menuStack, this->settings, this->renderWindow));
|
||||
this->menuStack->push(std::make_shared<GameSettingsAppMenu>(this->menuStack, this->settings, this->renderWindow));
|
||||
}
|
||||
if (this->playerCursor.getPosition().y == 1) {
|
||||
//TODO
|
||||
}
|
||||
if (this->playerCursor.getPosition().y == 2) {
|
||||
//TODO
|
||||
}
|
||||
}
|
||||
if (this->escReleased) {
|
||||
@@ -33,29 +41,29 @@ void MainAppMenu::drawFrame() const {
|
||||
|
||||
float sizeMultiplier = this->settings->getWindowSizeMultiplier();
|
||||
|
||||
sf::Font font("data/fonts/arial.ttf");
|
||||
sf::Text text(font, "", this->settings->getWindowSizeMultiplier() * 5);
|
||||
sf::Font font("data/fonts/pressstart/prstartk.ttf");
|
||||
sf::Text text(font, "", this->settings->getWindowSizeMultiplier() * 2);
|
||||
text.setFillColor(sf::Color(0, 0, 0));
|
||||
text.setOutlineColor(sf::Color(255, 255, 255));
|
||||
|
||||
text.setString("jminos");
|
||||
text.setString("JMINOS");
|
||||
text.setOrigin(text.getLocalBounds().getCenter());
|
||||
text.setPosition(sf::Vector2f({sizeMultiplier * 40, sizeMultiplier * 10}));
|
||||
this->renderWindow->draw(text);
|
||||
|
||||
text.setString("Play");
|
||||
text.setString("PLAY");
|
||||
text.setOutlineThickness((this->playerCursor.getPosition().y == 0) ? (sizeMultiplier / 2) : 0);
|
||||
text.setOrigin(text.getLocalBounds().getCenter());
|
||||
text.setPosition(sf::Vector2f({sizeMultiplier * 40, sizeMultiplier * 20}));
|
||||
this->renderWindow->draw(text);
|
||||
|
||||
text.setString("Settings");
|
||||
text.setString("SETTINGS");
|
||||
text.setOutlineThickness((this->playerCursor.getPosition().y == 1) ? (sizeMultiplier / 2) : 0);
|
||||
text.setOrigin(text.getLocalBounds().getCenter());
|
||||
text.setPosition(sf::Vector2f({sizeMultiplier * 40, sizeMultiplier * 30}));
|
||||
this->renderWindow->draw(text);
|
||||
|
||||
text.setString("Info");
|
||||
text.setString("INFO");
|
||||
text.setOutlineThickness((this->playerCursor.getPosition().y == 2) ? (sizeMultiplier / 2) : 0);
|
||||
text.setOrigin(text.getLocalBounds().getCenter());
|
||||
text.setPosition(sf::Vector2f({sizeMultiplier * 40, sizeMultiplier * 40}));
|
||||
|
||||
Reference in New Issue
Block a user