Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added loader/resources/download-mods-here.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions loader/src/hooks/MenuLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ struct CustomMenuLayer : Modify<CustomMenuLayer, MenuLayer> {
}
}

// show "download mods here" tip if the geode menu hasnt ever been opened and there arent mods already installed
if (!Mod::get()->getSavedValue<bool>("has-used-geode-before") && Loader::get()->getAllMods().size() == 1) {
if (auto bottomMenu = this->getChildByID("bottom-menu")) {
auto geodeBtn = bottomMenu->getChildByID("geode-button"_spr);

if (auto downloadModsHereSpr = CCSprite::createWithSpriteFrameName("download-mods-here.png"_spr)) {
downloadModsHereSpr->setID("download-mods-here"_spr);
downloadModsHereSpr->setPosition(this->convertToNodeSpace(geodeBtn->convertToWorldSpace(CCPointZero) + CCPoint(75.f, 55.f)));
downloadModsHereSpr->setScale(0.8f);
this->addChild(downloadModsHereSpr);
}
}
}

// show if some mods failed to load
if (Loader::get()->getLoadProblems().size()) {
static bool shownProblemPopup = false;
Expand Down
2 changes: 2 additions & 0 deletions loader/src/ui/mods/ModsLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ bool ModsStatusNode::init() {
return ListenerResult::Propagate;
});

Mod::get()->setSavedValue<bool>("has-used-geode-before", true);

this->updateState();

return true;
Expand Down