diff --git a/assets/Json/menu.json b/assets/Json/menu.json index 07f50d56..0a0422cc 100644 --- a/assets/Json/menu.json +++ b/assets/Json/menu.json @@ -54,7 +54,7 @@ "type": "input", "font": "assets/Fonts/soliden/SolidenTrial-Black.otf", "spritePath": "assets/Menu/input-box.png", - "text": "localhost", + "text": "", "color": "red", "textSize": 3, "maxChar": 16, diff --git a/src/Client/Systems/Graphic/GraphicSystems.cpp b/src/Client/Systems/Graphic/GraphicSystems.cpp index 141cd711..6e66e9df 100644 --- a/src/Client/Systems/Graphic/GraphicSystems.cpp +++ b/src/Client/Systems/Graphic/GraphicSystems.cpp @@ -49,8 +49,8 @@ namespace Systems { std::vector> textSystems = getTextSystems(); std::vector> deathSystems = DeathSystems::getDeathSystems(); - // std::vector> parallaxSystems = - // ParallaxSystems::getParallaxSystems(); + std::vector> parallaxSystems = + ParallaxSystems::getParallaxSystems(); #ifndef NDEBUG audioSystems.insert(audioSystems.end(), debugCollisionRect); @@ -58,7 +58,7 @@ namespace Systems { audioSystems.insert(audioSystems.end(), spriteSystems.begin(), spriteSystems.end()); audioSystems.insert(audioSystems.end(), textSystems.begin(), textSystems.end()); audioSystems.insert(audioSystems.end(), deathSystems.begin(), deathSystems.end()); - // audioSystems.insert(audioSystems.end(), parallaxSystems.begin(), parallaxSystems.end()); + audioSystems.insert(audioSystems.end(), parallaxSystems.begin(), parallaxSystems.end()); return audioSystems; } } // namespace Systems diff --git a/src/Client/Systems/Menus/Menu/MenuSystems.cpp b/src/Client/Systems/Menus/Menu/MenuSystems.cpp index a66f4b19..59c13301 100644 --- a/src/Client/Systems/Menus/Menu/MenuSystems.cpp +++ b/src/Client/Systems/Menus/Menu/MenuSystems.cpp @@ -114,9 +114,9 @@ namespace Systems { {typeid(Types::InputBox), typeid(Raylib::Text)}); static auto clockId = Registry::getInstance().getClock().create(); - for (auto id : ids) { - if (arrInputBox[id].selected && Raylib::isKeyDown(Raylib::KeyboardKey::KB_BACKSPACE)) { - if (Registry::getInstance().getClock().elapsedMillisecondsSince(clockId) > delay) { + if (Raylib::isKeyDown(Raylib::KeyboardKey::KB_BACKSPACE) && Registry::getInstance().getClock().elapsedMillisecondsSince(clockId) > delay) { + for (auto id : ids) { + if (arrInputBox[id].selected) { Registry::getInstance().getClock().restart(clockId); deleteInputBoxChar(id, arrInputBox); return;