we can load polyos in the app now

This commit is contained in:
2025-03-31 21:14:06 +02:00
parent de14978b01
commit 46ebb88ef2
6 changed files with 78 additions and 35 deletions

View File

@@ -12,9 +12,9 @@
StartUpAppMenu::StartUpAppMenu(std::shared_ptr<MenuStack> menuStack, std::shared_ptr<Settings> settings, std::shared_ptr<sf::RenderWindow> renderWindow) :
AppMenu(menuStack, settings, renderWindow),
playerCursor({LOADED_PIECES_SIZE + 1}) {
playerCursor({GENERATED_PIECES_SIZE + 1}) {
this->playerCursor.goToPosition({(unsigned int) std::clamp(this->settings->getMaximumPiecesSize(), MINIMUM_PIECES_SIZE, LOADED_PIECES_SIZE), 0u});
this->playerCursor.goToPosition({(unsigned int) std::clamp(this->settings->getMaximumPiecesSize(), MINIMUM_PIECES_SIZE, GENERATED_PIECES_SIZE), 0u});
}
void StartUpAppMenu::computeFrame() {
@@ -23,7 +23,7 @@ void StartUpAppMenu::computeFrame() {
if (this->playerCursor.getPosition().x < MINIMUM_PIECES_SIZE) {
if (this->playerCursor.movedLeft()) {
this->playerCursor.goToPosition({LOADED_PIECES_SIZE, 0});
this->playerCursor.goToPosition({GENERATED_PIECES_SIZE, 0});
}
else {
this->playerCursor.goToPosition({MINIMUM_PIECES_SIZE, 0});