Skip to content

Commit 04d1611

Browse files
committed
not sure if a mod can have multiple problems but here we go
1 parent 68dcc9b commit 04d1611

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MenuLayer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ class $modify(MyMenuLayer, MenuLayer) {
4040
if (type == LoadProblem::Type::Suggestion || type == LoadProblem::Type::Recommendation) continue;
4141
std::string colorTag = "<c-FF0000>";
4242
if (type == LoadProblem::Type::Conflict || type == LoadProblem::Type::Duplicate || type == LoadProblem::Type::DisabledDependency || type == LoadProblem::Type::MissingDependency) colorTag = "<cy>";
43-
else if (type == LoadProblem::Type::UnsupportedVersion || type == LoadProblem::Type::UnsupportedGeodeVersion || type == LoadProblem::Type::NeedsNewerGeodeVersion) colorTag = "<c-AAAAAA>";
44-
formattedProblemsList = formattedProblemsList.append(fmt::format("{}{}</c>, ", colorTag, message));
43+
else if (type == LoadProblem::Type::UnsupportedVersion || type == LoadProblem::Type::UnsupportedGeodeVersion || type == LoadProblem::Type::NeedsNewerGeodeVersion) colorTag = "<c-DCDCDC>";
44+
formattedProblemsList = formattedProblemsList.append(fmt::format("{}{}</c> | ", colorTag, message));
4545
}
46-
if (!formattedProblemsList.empty() && utils::string::endsWith(formattedProblemsList, ", ")) {
46+
if (!formattedProblemsList.empty() && utils::string::endsWith(formattedProblemsList, " | ")) {
47+
formattedProblemsList.pop_back();
4748
formattedProblemsList.pop_back();
4849
formattedProblemsList.pop_back();
4950
}
@@ -52,15 +53,14 @@ class $modify(MyMenuLayer, MenuLayer) {
5253

5354
const std::string& formattedModListItem = fmt::format(
5455
"- {}{}</c> {} {} [{}]{}",
55-
mod->isEnabled() ? "<cg>" : hasNoProblems ? "<cy>" : "<c-FF0000>",
56+
mod->isEnabled() ? "<c-FFFFFF>" : hasNoProblems ? "<c-AAAAAA>" : "<c-FF0000>",
5657
mod->getName(), mod->getVersion().toVString(), formattedByline,
5758
modID, formattedProblemsList
5859
);
5960

6061
manager->formattedModsListVector.push_back(formattedModListItem);
6162
manager->modsListFormatted = manager->modsListFormatted.append(fmt::format("{}\n", formattedModListItem));
6263
});
63-
log::info("manager->modsListFormatted:\n{}", manager->modsListFormatted);
6464
return result;
6565
}
6666
};

0 commit comments

Comments
 (0)