Skip to content

Commit 98c210e

Browse files
committed
add notif when showing deprecations
1 parent 2b3d10f commit 98c210e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

loader/src/ui/mods/list/ModList.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ void ModList::onCheckUpdates(InstalledModsUpdateCheck const& check) {
510510
m_hideUpdatesSpr->setString("Hide");
511511
}
512512

513+
m_hasDeprecations = check.modsWithDeprecations.size() > 0;
514+
513515
m_toggleUpdatesOnlyBtn->setContentSize(m_showUpdatesSpr->getScaledContentSize());
514516

515517
// Recreate the menu with the updated label
@@ -753,6 +755,9 @@ void ModList::onToggleUpdates(CCObject*) {
753755
mut->type = mut->type == InstalledModListType::OnlyUpdates ?
754756
InstalledModListType::All :
755757
InstalledModListType::OnlyUpdates;
758+
if(mut->type == InstalledModListType::OnlyUpdates && m_hasDeprecations) {
759+
Notification::create("Click the (!) button to see\nalternatives for each mod.", nullptr, NOTIFICATION_DEFAULT_TIME * 3)->show();
760+
}
756761
}
757762
}
758763
void ModList::onToggleErrors(CCObject*) {
@@ -762,7 +767,7 @@ void ModList::onToggleErrors(CCObject*) {
762767
InstalledModListType::All :
763768
InstalledModListType::OnlyErrors;
764769
if(mut->type == InstalledModListType::OnlyErrors) {
765-
Notification::create("Click the (!) button to see\nthe errors for each mod.", nullptr, NOTIFICATION_DEFAULT_TIME * 2)->show();
770+
Notification::create("Click the (!) button to see\nthe errors for each mod.", nullptr, NOTIFICATION_DEFAULT_TIME * 3)->show();
766771
}
767772
}
768773
}

loader/src/ui/mods/list/ModList.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class ModList : public CCNode {
5858
async::TaskHolder<server::ServerResult<InstalledModsUpdateCheck>> m_checkUpdatesListener;
5959
ModListDisplay m_display = ModListDisplay::SmallList;
6060
bool m_exiting = false;
61+
bool m_hasDeprecations = false;
6162
std::atomic<size_t> m_searchInputThreads = 0;
6263

6364
bool init(ModListSource* src, CCSize const& size, bool searchingDev);

0 commit comments

Comments
 (0)