mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +00:00
Fixed a cursor placement issue in GuiTextEditKeyboardPopup.
This commit is contained in:
parent
3669d2320c
commit
087cde4700
|
@ -133,9 +133,6 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup(
|
|||
mText = std::make_shared<TextEditComponent>(mWindow);
|
||||
mText->setValue(initValue);
|
||||
|
||||
if (!multiLine)
|
||||
mText->setCursor(initValue.size());
|
||||
|
||||
// Header.
|
||||
mGrid.setEntry(mTitle, glm::ivec2{0, 0}, false, true);
|
||||
|
||||
|
@ -289,6 +286,9 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup(
|
|||
setPosition((static_cast<float>(Renderer::getScreenWidth()) - mSize.x) / 2.0f,
|
||||
(static_cast<float>(Renderer::getScreenHeight()) - mSize.y) / 2.0f);
|
||||
}
|
||||
|
||||
if (!multiLine)
|
||||
mText->setCursor(initValue.size());
|
||||
}
|
||||
|
||||
void GuiTextEditKeyboardPopup::onSizeChanged()
|
||||
|
|
|
@ -102,7 +102,7 @@ GuiTextEditPopup::GuiTextEditPopup(Window* window,
|
|||
if (multiLine)
|
||||
textHeight *= 6.0f;
|
||||
|
||||
mText->setSize(0, textHeight);
|
||||
mText->setSize(0.0f, textHeight);
|
||||
|
||||
// Adapt width to the geometry of the display. The 1.778 aspect ratio is the 16:9 reference.
|
||||
float aspectValue = 1.778f / Renderer::getScreenAspectRatio();
|
||||
|
|
Loading…
Reference in a new issue