Skip to content

Commit

Permalink
fix level length positioning when level loses star value after openin…
Browse files Browse the repository at this point in the history
…g levelinfolayer
  • Loading branch information
Cvolton committed Dec 1, 2023
1 parent 6e78e71 commit 36b3edc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hooks/LevelInfoLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class $modify(LevelInfoLayer) {
retain();

LevelInfoLayer::updateLabelValues();

auto bmFont = typeinfo_cast<CCLabelBMFont*>(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
Expand Down

0 comments on commit 36b3edc

Please sign in to comment.