Skip to content

Commit

Permalink
CLIENT-GAME: Fix review commentaries
Browse files Browse the repository at this point in the history
PATCH
  • Loading branch information
KitetsuK committed Nov 2, 2023
1 parent d4a3d90 commit 4e89f34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/Json/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/Client/Systems/Graphic/GraphicSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ namespace Systems {
std::vector<std::function<void(std::size_t, std::size_t)>> textSystems = getTextSystems();
std::vector<std::function<void(std::size_t, std::size_t)>> deathSystems =
DeathSystems::getDeathSystems();
// std::vector<std::function<void(std::size_t, std::size_t)>> parallaxSystems =
// ParallaxSystems::getParallaxSystems();
std::vector<std::function<void(std::size_t, std::size_t)>> parallaxSystems =
ParallaxSystems::getParallaxSystems();

#ifndef NDEBUG
audioSystems.insert(audioSystems.end(), debugCollisionRect);
#endif
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
6 changes: 3 additions & 3 deletions src/Client/Systems/Menus/Menu/MenuSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e89f34

Please sign in to comment.