From 36b3edcdc35e457795e1f72968f264d0b49dd9cc Mon Sep 17 00:00:00 2001 From: Cvolton Date: Fri, 1 Dec 2023 20:02:30 +0100 Subject: [PATCH] fix level length positioning when level loses star value after opening levelinfolayer --- src/hooks/LevelInfoLayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hooks/LevelInfoLayer.cpp b/src/hooks/LevelInfoLayer.cpp index 298d36b..d9103d3 100644 --- a/src/hooks/LevelInfoLayer.cpp +++ b/src/hooks/LevelInfoLayer.cpp @@ -44,6 +44,10 @@ class $modify(LevelInfoLayer) { retain(); LevelInfoLayer::updateLabelValues(); + + auto bmFont = typeinfo_cast(getChildByID("bi-exact-time")); + if(bmFont && m_lengthLabel) bmFont->setPosition({m_lengthLabel->getPositionX() + 1, m_lengthLabel->getPositionY() - 8.f}); + std::thread([this](){ auto wt = ExtendedLevelInfo::workingTime(std::round(BetterInfo::timeForLevelString(m_level->m_levelString))); //since whatever is done by queueInMainThread is guaranteed to execute after init is finished, this shouldn't result in a race condition