Fixed a small vertical positioning issue for the main menu.

This commit is contained in:
Leon Styhre 2023-01-24 18:30:04 +01:00
parent 071c4d22ce
commit b17b7194a6

View file

@ -42,7 +42,7 @@
GuiMenu::GuiMenu() GuiMenu::GuiMenu()
: mMenu {"MAIN MENU"} : mMenu {"MAIN MENU"}
{ {
bool isFullUI = UIModeController::getInstance()->isUIModeFull(); bool isFullUI {UIModeController::getInstance()->isUIModeFull()};
if (isFullUI) if (isFullUI)
addEntry("SCRAPER", 0x777777FF, true, [this] { openScraperOptions(); }); addEntry("SCRAPER", 0x777777FF, true, [this] { openScraperOptions(); });
@ -73,7 +73,8 @@ GuiMenu::GuiMenu()
addChild(&mMenu); addChild(&mMenu);
addVersionInfo(); addVersionInfo();
setSize(mMenu.getSize()); setSize(mMenu.getSize());
setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, Renderer::getScreenHeight() * 0.13f); setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f,
std::round(Renderer::getScreenHeight() * 0.13f));
} }
GuiMenu::~GuiMenu() GuiMenu::~GuiMenu()