mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Merge pull request #232 from hex007/better-menus
Better handle Menu width
This commit is contained in:
commit
c397492625
|
@ -153,7 +153,8 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector
|
|||
mGrid.setEntry(mButtons, Vector2i(0, 2), true, false);
|
||||
|
||||
// resize + center
|
||||
setSize(Renderer::getScreenWidth() * 0.5f, Renderer::getScreenHeight() * 0.82f);
|
||||
float width = std::min(Renderer::getScreenHeight(), (unsigned int) (Renderer::getScreenWidth() * 0.90f));
|
||||
setSize(width, Renderer::getScreenHeight() * 0.82f);
|
||||
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,8 @@ void MenuComponent::updateSize()
|
|||
}
|
||||
}
|
||||
|
||||
setSize(Renderer::getScreenWidth() * 0.5f, height);
|
||||
float width = std::min(Renderer::getScreenHeight(), (unsigned int) (Renderer::getScreenWidth() * 0.90f));
|
||||
setSize(width, height);
|
||||
}
|
||||
|
||||
void MenuComponent::onSizeChanged()
|
||||
|
|
Loading…
Reference in a new issue