Skip to content

Commit

Permalink
automatically close the modtober winner animation after a while
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Dec 10, 2024
1 parent 15a1b34 commit 28380f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions loader/src/ui/mods/events/EventWinnerAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ bool EventWinnerAnimation::init() {
));
this->addChildAtPosition(okBtn, Anchor::Center, ccp(0, -110));
}),
CCDelayTime::create(10.f),
CallFuncExt::create([this]() {
this->onClose(nullptr);
}),
nullptr
));

Expand All @@ -237,6 +241,7 @@ bool EventWinnerAnimation::init() {
}

void EventWinnerAnimation::onClose(CCObject*) {
this->stopAllActions();
m_bg->runAction(CCFadeTo::create(1.f, 0));
float offset = 0.f;
for (auto child : CCArrayExt<CCNode*>(this->getChildren())) {
Expand Down

0 comments on commit 28380f8

Please sign in to comment.