diff --git a/screenshot000.png b/screenshot000.png deleted file mode 100644 index e4060bf1..00000000 Binary files a/screenshot000.png and /dev/null differ diff --git a/sources/Runner/SettingsMenuScene.cpp b/sources/Runner/SettingsMenuScene.cpp index 8883bbeb..49a27031 100644 --- a/sources/Runner/SettingsMenuScene.cpp +++ b/sources/Runner/SettingsMenuScene.cpp @@ -35,7 +35,7 @@ namespace BBM .addComponent(1920 / 3, 180, 0) .addComponent("assets/logo_small.png"); auto &music = scene->addEntity("music text") - .addComponent(1920 / 2.5, 1080 - 540, 0) + .addComponent(1920 / 2.5, 1080 - 100 - 540, 0) .addComponent("Music Volume", 70, RAY::Vector2(), BLACK) .addComponent() .addComponent([](WAL::Entity &entity, WAL::Wal &) @@ -48,7 +48,7 @@ namespace BBM }); auto &musicUp = scene->addEntity("music up button") - .addComponent(1920 / 1.5, 1080 - 540, 0) + .addComponent(1920 / 1.5, 1080 - 100 - 540, 0) .addComponent("assets/buttons/button_plus.png") .addComponent("assets/musics/music_title.ogg") .addComponent([](WAL::Entity &entity, WAL::Wal &) @@ -71,7 +71,7 @@ namespace BBM }); auto &musicDown = scene->addEntity("music down button") - .addComponent(1920 / 3, 1080 - 540, 0) + .addComponent(1920 / 3, 1080 - 100 - 540, 0) .addComponent("assets/buttons/button_minus.png") .addComponent("assets/musics/music_title.ogg") .addComponent([](WAL::Entity &entity, WAL::Wal &) @@ -94,7 +94,7 @@ namespace BBM }); auto &sound = scene->addEntity("sound text") - .addComponent(1920 / 2.5, 1080 - 360, 0) + .addComponent(1920 / 2.5, 1080 - 100 - 360, 0) .addComponent("Sound Volume", 70, RAY::Vector2(), BLACK) .addComponent() .addComponent([](WAL::Entity &entity, WAL::Wal &) @@ -107,7 +107,7 @@ namespace BBM }); auto &soundUp = scene->addEntity("sound up button") - .addComponent(1920 / 1.5, 1080 - 360, 0) + .addComponent(1920 / 1.5, 1080 - 100 - 360, 0) .addComponent("assets/buttons/button_plus.png") .addComponent(sounds) .addComponent([](WAL::Entity &entity, WAL::Wal &) @@ -130,7 +130,7 @@ namespace BBM }); auto &soundDown = scene->addEntity("sound down button") - .addComponent(1920 / 3, 1080 - 360, 0) + .addComponent(1920 / 3, 1080 - 100 - 360, 0) .addComponent("assets/buttons/button_minus.png") .addComponent(sounds) .addComponent([](WAL::Entity &entity, WAL::Wal &) @@ -153,7 +153,7 @@ namespace BBM }); auto &debug = scene->addEntity("debug text") - .addComponent(1920 / 2.5, 1080 - 180, 0) + .addComponent(1920 / 2.5, 1080 - 100 - 180, 0) .addComponent("Debug Mode: Off", 70, RAY::Vector2(), BLACK) .addComponent([](WAL::Entity &entity, WAL::Wal &wal) { @@ -175,6 +175,29 @@ namespace BBM { entity.getComponent().drawable->setColor(ORANGE); }); + auto &fullscreen = scene->addEntity("fullscreen text") + .addComponent(1920 / 2.5, 1080 - 100 - 50, 0) + .addComponent("Fullscreen: On", 70, RAY::Vector2(), BLACK) + .addComponent([](WAL::Entity &entity, WAL::Wal &wal) + { + RAY2D::Text *text = dynamic_cast(entity.getComponent().drawable.get()); + + if (text->getString().find("Off") != std::string::npos) { + text->setText("Fullscreen: On"); + //do + } else { + text->setText("Fullscreen: Off"); + //do + } + }) + .addComponent([](WAL::Entity &entity, WAL::Wal &) + { + entity.getComponent().drawable->setColor(BLACK); + }) + .addComponent([](WAL::Entity &entity, WAL::Wal &) + { + entity.getComponent().drawable->setColor(ORANGE); + }); auto &back = scene->addEntity("back to menu") .addComponent(10, 1080 - 85, 0) .addComponent("assets/buttons/button_back.png") @@ -204,8 +227,9 @@ namespace BBM sound.getComponent().setButtonLinks(&music, &debug, &soundDown, &soundUp); soundDown.getComponent().setButtonLinks(&music, &debug, nullptr, &sound); soundUp.getComponent().setButtonLinks(&music, &debug, &sound); - debug.getComponent().setButtonLinks(&sound, &back, &back); - back.getComponent().setButtonLinks(&debug, nullptr, nullptr, &debug); + debug.getComponent().setButtonLinks(&sound, &fullscreen); + fullscreen.getComponent().setButtonLinks(&debug, &back, &back); + back.getComponent().setButtonLinks(&fullscreen, nullptr, nullptr, &fullscreen); return scene; } } \ No newline at end of file