@@ -422,6 +422,20 @@ bool ModsLayer::init() {
422422 settingsBtn->setID (" settings-button" );
423423 actionsMenu->addChild (settingsBtn);
424424
425+ auto restartGDSpr = CCSprite::createWithSpriteFrameName (" reload.png" _spr);
426+ restartGDSpr->setColor ({ 255 , 100 , 100 });
427+ auto restartGDCircleSpr = createGeodeCircleButton (
428+ restartGDSpr, 1 .f ,
429+ CircleBaseSize::Medium
430+ );
431+ restartGDCircleSpr->setScale (.8f );
432+ restartGDCircleSpr->setTopOffset (ccp (.5f , 0 ));
433+ auto restartGDBtn = CCMenuItemSpriteExtra::create (
434+ restartGDCircleSpr, this , menu_selector (ModsLayer::onRestartGD)
435+ );
436+ restartGDBtn->setID (" restart-gd-button" );
437+ actionsMenu->addChild (restartGDBtn);
438+
425439 auto folderSpr = createGeodeCircleButton (
426440 CCSprite::createWithSpriteFrameName (" gj_folderBtn_001.png" ), 1 .f ,
427441 CircleBaseSize::Medium
@@ -848,6 +862,18 @@ void ModsLayer::onTheme(CCObject*) {
848862void ModsLayer::onSettings (CCObject*) {
849863 openSettingsPopup (Mod::get (), false );
850864}
865+ void ModsLayer::onRestartGD (CCObject*) {
866+ createQuickPopup (
867+ " Restart Geometry Dash" ,
868+ " Are you sure you want to restart Geometry Dash?" ,
869+ " Cancel" , " Restart" ,
870+ [](auto , bool btn2) {
871+ if (btn2) {
872+ game::restart (true );
873+ }
874+ }
875+ );
876+ }
851877
852878ModsLayer* ModsLayer::create () {
853879 auto ret = new ModsLayer ();
0 commit comments