Skip to content

Commit 5676c4e

Browse files
committed
a
1 parent c655734 commit 5676c4e

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/xd.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,11 +565,17 @@ class MainLevelsEditorMenu : public geode::Popup<> {
565565
//remove pack dir
566566
fs::remove_all(pack, err);
567567
//show packs
568-
Ref popup = VideoOptionsLayer::create();
568+
Ref options = OptionsLayer::create();
569+
auto item = typeinfo_cast<CCMenuItem*>(options->querySelector(
570+
"geode.texture-loader/texture-loader-button"
571+
));
572+
if (item) return item->activate();
573+
#ifdef GEODE_IS_DESKTOP //ios scared me
574+
options->onVideo(options);
569575
__this->runAction(CCSequence::create(
570576
CallFuncExt::create(
571-
[popup] {
572-
auto item = typeinfo_cast<CCMenuItem*>(popup->querySelector(
577+
[] {
578+
auto item = typeinfo_cast<CCMenuItem*>(CCScene::get()->querySelector(
573579
"geode.texture-loader/texture-loader-button"
574580
));
575581
if (item) item->activate();
@@ -583,10 +589,13 @@ class MainLevelsEditorMenu : public geode::Popup<> {
583589
));
584590
if (item) item->activate();
585591
else log::error("reload-button = {}", item);
592+
593+
if (Ref a = CCScene::get()->getChildByType<VideoOptionsLayer>(0)) a->keyBackClicked();
586594
}
587595
),
588596
nullptr
589597
));
598+
#endif
590599
}
591600
);
592601
tp_create->setLayoutOptions(lopts);

0 commit comments

Comments
 (0)