Fixed a GUI component alignment issue for the text edit popups.

This commit is contained in:
Leon Styhre 2020-12-16 17:38:23 +01:00
parent 0c7e02e6f4
commit 05302052de
2 changed files with 3 additions and 4 deletions

View file

@ -86,11 +86,10 @@ GuiComplexTextEditPopup::GuiComplexTextEditPopup(
if (multiLine) if (multiLine)
textHeight *= 6; textHeight *= 6;
mText->setSize(0, textHeight); mText->setSize(0, textHeight);
setSize(Renderer::getScreenWidth() * 0.75f,mTitle->getFont()->getHeight() + setSize(Renderer::getScreenWidth() * 0.75f, mTitle->getFont()->getHeight() +
textHeight + mButtonGrid->getSize().y() + 220); textHeight + mButtonGrid->getSize().y() + mButtonGrid->getSize().y() * 1.85);
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, setPosition((Renderer::getScreenWidth() - mSize.x()) / 2,
(Renderer::getScreenHeight() - mSize.y()) / 2); (Renderer::getScreenHeight() - mSize.y()) / 2);
mText->startEditing(); mText->startEditing();

View file

@ -63,7 +63,7 @@ GuiTextEditPopup::GuiTextEditPopup(
mText->setSize(0, textHeight); mText->setSize(0, textHeight);
setSize(Renderer::getScreenWidth() * 0.5f, mTitle->getFont()->getHeight() + setSize(Renderer::getScreenWidth() * 0.5f, mTitle->getFont()->getHeight() +
textHeight + mButtonGrid->getSize().y() + 40); textHeight + mButtonGrid->getSize().y() + mButtonGrid->getSize().y() / 2);
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() -
mSize.y()) / 2); mSize.y()) / 2);
mText->startEditing(); mText->startEditing();