Skip to content

Commit

Permalink
Fixed button label align
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardodoria committed Aug 8, 2023
1 parent 882d1bf commit 32d6486
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engine/core/subsystem/UISystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ void UISystem::updateButton(Entity entity, ButtonComponent& button, ImageCompone

labellayout.width = 0;
labellayout.height = 0;
labeltext.needUpdateText = true;
createOrUpdateText(labeltext, labelui, labellayout);

labellayout.anchorPreset = AnchorPreset::CENTER;
Expand Down Expand Up @@ -339,6 +340,7 @@ void UISystem::updateTextEdit(Entity entity, TextEditComponent& textedit, ImageC
UIComponent& textui = scene->getComponent<UIComponent>(textedit.text);
TextComponent& text = scene->getComponent<TextComponent>(textedit.text);

text.needUpdateText = true;
createOrUpdateText(text, textui, textlayout);

if (layout.height == 0){
Expand Down

0 comments on commit 32d6486

Please sign in to comment.