From 028c8eafa982a5b126544f733880dd7711e0786a Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sun, 8 Oct 2023 04:17:07 -0500 Subject: Additional overlay plugin support * Add isOverlayFlagged to IPluginList * Further notate plugin list * Rename to match xEdit / Wrye / LOOT * Update counter --- src/pluginlistview.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/pluginlistview.cpp') diff --git a/src/pluginlistview.cpp b/src/pluginlistview.cpp index 3c2bf000..28f77821 100644 --- a/src/pluginlistview.cpp +++ b/src/pluginlistview.cpp @@ -58,9 +58,11 @@ void PluginListView::updatePluginCount() { int activeMasterCount = 0; int activeLightMasterCount = 0; + int activeOverlayCount = 0; int activeRegularCount = 0; int masterCount = 0; int lightMasterCount = 0; + int overlayCount = 0; int regularCount = 0; int activeVisibleCount = 0; @@ -78,6 +80,10 @@ void PluginListView::updatePluginCount() masterCount++; activeMasterCount += active; activeVisibleCount += visible && active; + } else if (list->isOverlayFlagged(plugin)) { + overlayCount++; + activeOverlayCount += active; + activeVisibleCount += visible && active; } else { regularCount++; activeRegularCount += active; @@ -85,8 +91,9 @@ void PluginListView::updatePluginCount() } } - int activeCount = activeMasterCount + activeLightMasterCount + activeRegularCount; - int totalCount = masterCount + lightMasterCount + regularCount; + int activeCount = activeMasterCount + activeLightMasterCount + activeOverlayCount + + activeRegularCount; + int totalCount = masterCount + lightMasterCount + overlayCount + regularCount; ui.counter->display(activeVisibleCount); ui.counter->setToolTip( @@ -99,6 +106,7 @@ void PluginListView::updatePluginCount() "ESMs+ESPs:%9 %10" "ESLs:%5 %6" + "Overlay:%11 %12" "") .arg(activeCount) .arg(totalCount) @@ -109,7 +117,9 @@ void PluginListView::updatePluginCount() .arg(activeRegularCount) .arg(regularCount) .arg(activeMasterCount + activeRegularCount) - .arg(masterCount + regularCount)); + .arg(masterCount + regularCount) + .arg(activeOverlayCount) + .arg(overlayCount)); } void PluginListView::onFilterChanged(const QString& filter) -- cgit v1.3.1