Skip to content

Commit

Permalink
hide random btn when theres only 1 page of results
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Jan 9, 2024
1 parent b04c61b commit 92c1c6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hooks/LevelBrowserLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ class $modify(BILevelBrowserLayer, LevelBrowserLayer) {
if(auto lastButton = pageMenu->getChildByID("last-button"_spr)) {
lastButton->setVisible(this->m_itemCount > BetterInfo::levelsPerPage(this->m_searchObject));
}
if(auto randomButton = pageMenu->getChildByID("random-button"_spr)) {
randomButton->setVisible(this->m_itemCount > BetterInfo::levelsPerPage(this->m_searchObject));
}
}
}

Expand Down

0 comments on commit 92c1c6b

Please sign in to comment.