Skip to content

Commit

Permalink
fix incorrect popup ordering in bi layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Oct 17, 2024
1 parent 12dc199 commit 0ece5c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"geode": "3.7.1",
"geode": "3.8.1",
"version": "v4.2.10",
"gd": {
"win": "2.206",
Expand Down
10 changes: 7 additions & 3 deletions src/layers/_bases/BIBaseLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,16 @@ void BIBaseLayer::onEnterTransitionDidFinish() {
CCLayer::onEnterTransitionDidFinish();

//workaround for no esc catching bug
std::vector<Ref<FLAlertLayer>> alerts;

size_t i = 0;
while(Ref<FLAlertLayer> alert = getChildOfType<FLAlertLayer>(this, i++)) {
alert->retain();
while(auto alert = getChildOfType<FLAlertLayer>(this, i++)) {
alerts.push_back(alert);
}

for(auto alert : alerts) {
alert->removeFromParentAndCleanup(false);
alert->m_noElasticity = true;
alert->show();
alert->release();
}
}

0 comments on commit 0ece5c7

Please sign in to comment.