Skip to content

Commit

Permalink
BLUGA: Fix text inputBox Position
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Nov 5, 2023
1 parent c319fa7 commit de198cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/B-luga-graphics/include/B-luga-graphics/TextSystems.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ namespace Systems {
Registry::getInstance().getComponents<Types::Position>();
Registry::components<Types::FontSize> arrFsz =
Registry::getInstance().getComponents<Types::FontSize>();
Registry::components<Types::InputBox> arrInputBox =
Registry::getInstance().getComponents<Types::InputBox>();
Registry::components<Types::Button> arrButton =
Registry::getInstance().getComponents<Types::Button>();

Types::FontSize defaultFsz = {text->getFontSize()};
setFontSizeResponsive(text, defaultFsz);
Expand All @@ -54,7 +58,7 @@ namespace Systems {
Maths::floatToIntConservingDecimals(text->getPosition().x),
Maths::floatToIntConservingDecimals(text->getPosition().y)};
setPositionResponsive(text, defaultPosition);
if (arrPosition.exist(id)) {
if (arrPosition.exist(id) && !arrInputBox.exist(id) && !arrButton.exist(id)) {
setPositionResponsive(text, arrPosition[id]);
}
text->setColor(text->getColor());
Expand Down

0 comments on commit de198cf

Please sign in to comment.