mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-30 01:55:39 +00:00
Fixed an issue where GuiMsgBox would not look correct on high resolution displays.
This commit is contained in:
parent
5558557dc8
commit
8f1108583c
|
@ -71,7 +71,8 @@ GuiMsgBox::GuiMsgBox(Window* window, const HelpStyle& helpstyle, const std::stri
|
||||||
mMsg->setSize(width, 0); // mMsg->getSize.y() now returns the proper length.
|
mMsg->setSize(width, 0); // mMsg->getSize.y() now returns the proper length.
|
||||||
const float msgHeight = std::max(Font::get(FONT_SIZE_LARGE)->getHeight(),
|
const float msgHeight = std::max(Font::get(FONT_SIZE_LARGE)->getHeight(),
|
||||||
mMsg->getSize().y()*1.225f);
|
mMsg->getSize().y()*1.225f);
|
||||||
setSize(width + HORIZONTAL_PADDING_PX*2, msgHeight + mButtonGrid->getSize().y());
|
setSize(width + HORIZONTAL_PADDING_PX * 2 * Renderer::getScreenWidthModifier(),
|
||||||
|
msgHeight + mButtonGrid->getSize().y());
|
||||||
|
|
||||||
// Center for good measure.
|
// Center for good measure.
|
||||||
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2.0f,
|
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2.0f,
|
||||||
|
@ -107,7 +108,8 @@ void GuiMsgBox::onSizeChanged()
|
||||||
mGrid.setRowHeightPerc(1, mButtonGrid->getSize().y() / mSize.y());
|
mGrid.setRowHeightPerc(1, mButtonGrid->getSize().y() / mSize.y());
|
||||||
|
|
||||||
// Update messagebox size.
|
// Update messagebox size.
|
||||||
mMsg->setSize(mSize.x() - HORIZONTAL_PADDING_PX*2, mGrid.getRowHeight(0));
|
mMsg->setSize(mSize.x() - HORIZONTAL_PADDING_PX * 2 * Renderer::getScreenWidthModifier(),
|
||||||
|
mGrid.getRowHeight(0));
|
||||||
mGrid.onSizeChanged();
|
mGrid.onSizeChanged();
|
||||||
|
|
||||||
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
mBackground.fitTo(mSize, Vector3f::Zero(), Vector2f(-32, -32));
|
||||||
|
|
Loading…
Reference in a new issue