File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 11#include " SongManager.hpp"
22#include " ui/PlayingCard.hpp"
3+ #include " ui/SongControlMenu.hpp"
34#include " Utils.hpp"
45#include < random>
56#include < regex>
@@ -403,6 +404,7 @@ void Utils::resetSongManagerRefreshVectorSetNewSongBecause(const std::string_vie
403404 // change the song when you click apply, stoi will not like custom names. --elnexreal
404405
405406 Utils::setNewSong ();
407+ if (SongControlMenu* scm = cocos2d::CCScene::get ()->getChildByType <SongControlMenu>(0 ); scm) return geode::Loader::get ()->queueInMainThread ([scm] { scm->onRegenButton (nullptr ); });
406408}
407409
408410
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ class SongControlMenu final : public geode::Popup<const std::string&> {
1010 cocos2d::extension::CCScale9Sprite*b{};
1111 bool setup (std::string const & id) override ;
1212 void onShuffleButton (CCObject*);
13- void onRegenButton (CCObject*);
1413 void onCopyButton (CCObject*);
1514 void onBlacklistButton (CCObject*);
1615 void onFavoriteButton (CCObject*);
@@ -19,6 +18,7 @@ class SongControlMenu final : public geode::Popup<const std::string&> {
1918 void onSettingsButton (CCObject*);
2019public:
2120 static SongControlMenu* create (const std::string& id);
21+ void onRegenButton (CCObject*);
2222 void updateCurrentLabel ();
2323 void onExit () override ;
2424};
You can’t perform that action at this time.
0 commit comments