From 3f64b98cf1fdf73f173acabcd8fc969c2ceb4fb3 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Sat, 11 Feb 2023 19:34:40 +0200 Subject: [PATCH] update MenuLayer ids --- loader/src/ids/MenuLayer.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/loader/src/ids/MenuLayer.cpp b/loader/src/ids/MenuLayer.cpp index 671f71bc..1c825264 100644 --- a/loader/src/ids/MenuLayer.cpp +++ b/loader/src/ids/MenuLayer.cpp @@ -35,28 +35,27 @@ $register_ids(MenuLayer) { auto playBtn = setIDSafe(menu, 0, "play-button"); auto iconBtn = setIDSafe(menu, 1, "icon-kit-button"); - // the buttons are added in order play, icon, editor which doesn't work - // well with setLayout that deals with children in order - menu->swapChildIndices(playBtn, iconBtn); - setIDSafe(menu, 2, "editor-button"); if (auto pfp = setIDSafe(menu, 3, "profile-button")) { auto profileMenu = detachAndCreateMenu( this, "profile-menu", - ColumnLayout::create() - ->setAxisAlignment(AxisAlignment::Start) - ->setAxisReverse(true), + RowLayout::create() + ->setAxisAlignment(AxisAlignment::Start), pfp ); - profileMenu->setContentSize({ 50.f, 200.f }); - profileMenu->setPositionY( - profileMenu->getPositionY() + 200.f / 2 - + profileMenu->setContentSize({ 200.f, 50.f }); + profileMenu->setPositionX( + profileMenu->getPositionX() + 200.f / 2 - pfp->getScaledContentSize().height / 2 ); profileMenu->updateLayout(); } + // the buttons are added in order play, icon, editor which doesn't work + // well with setLayout that deals with children in order + menu->swapChildIndices(playBtn, iconBtn); + menu->setContentSize({ 400.f, 65.f }); menu->setLayout( RowLayout::create()