Skip to content

Commit

Permalink
you can now view the mod you're missing :)
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Dec 20, 2024
1 parent bda9444 commit 0d7e99e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions loader/src/ui/mods/list/ModProblemItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <Geode/loader/Loader.hpp>
#include <Geode/loader/Log.hpp>
#include <Geode/loader/Mod.hpp>
#include <Geode/ui/GeodeUI.hpp>
#include <Geode/ui/TextArea.hpp>
#include <Geode/utils/cocos.hpp>
#include <Geode/utils/ColorProvider.hpp>
Expand Down Expand Up @@ -124,6 +125,11 @@ CCSprite* ModProblemItem::createSeverityIcon() {
}

void ModProblemItem::onInfo(CCObject*) {
if (m_problem.type == LoadProblem::Type::MissingDependency) {
(void)openInfoPopup(m_problem.message);
return;
}

if (m_problem.message.length() > 400) {
// show message in a scrolling layer if it's too long
FLAlertLayer::create(nullptr, "Error Details", m_problem.message, "OK", nullptr, 400.0f, true, 280.0f, 1.0f)->show();
Expand All @@ -143,6 +149,7 @@ bool ModProblemItem::showInfoButton() {
case LoadProblem::Type::InvalidFile:
case LoadProblem::Type::LoadFailed:
case LoadProblem::Type::EnableFailed:
case LoadProblem::Type::MissingDependency:
return true;
default:
return false;
Expand Down

0 comments on commit 0d7e99e

Please sign in to comment.