From 6d08d434a8a5a4471a620974a52550ada05ab663 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Thu, 13 Jun 2024 10:51:09 -0500 Subject: Add medium plugin support (Starfield) (#2048) * Add medium plugin support (Starfield) - Coopt the overlay support for the new 'medium' / ESH plugin flag - Update various displays to include ESH info * Rework address display for SF weirdness * Fix core ESH display --- src/pluginlistview.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/pluginlistview.cpp') diff --git a/src/pluginlistview.cpp b/src/pluginlistview.cpp index 28f77821..8b34f75d 100644 --- a/src/pluginlistview.cpp +++ b/src/pluginlistview.cpp @@ -56,15 +56,15 @@ QModelIndexList PluginListView::indexViewToModel(const QModelIndexList& index) c 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; + int activeMasterCount = 0; + int activeMediumMasterCount = 0; + int activeLightMasterCount = 0; + int activeRegularCount = 0; + int masterCount = 0; + int mediumMasterCount = 0; + int lightMasterCount = 0; + int regularCount = 0; + int activeVisibleCount = 0; PluginList* list = m_core->pluginList(); QString filter = ui.filter->text(); @@ -72,7 +72,11 @@ void PluginListView::updatePluginCount() for (QString plugin : list->pluginNames()) { bool active = list->isEnabled(plugin); bool visible = m_sortProxy->filterMatchesPlugin(plugin); - if (list->hasLightExtension(plugin) || list->isLightFlagged(plugin)) { + if (list->isMediumFlagged(plugin)) { + mediumMasterCount++; + activeMediumMasterCount += active; + activeVisibleCount += visible && active; + } else if (list->hasLightExtension(plugin) || list->isLightFlagged(plugin)) { lightMasterCount++; activeLightMasterCount += active; activeVisibleCount += visible && active; @@ -80,10 +84,6 @@ void PluginListView::updatePluginCount() masterCount++; activeMasterCount += active; activeVisibleCount += visible && active; - } else if (list->isOverlayFlagged(plugin)) { - overlayCount++; - activeOverlayCount += active; - activeVisibleCount += visible && active; } else { regularCount++; activeRegularCount += active; @@ -91,9 +91,9 @@ void PluginListView::updatePluginCount() } } - int activeCount = activeMasterCount + activeLightMasterCount + activeOverlayCount + - activeRegularCount; - int totalCount = masterCount + lightMasterCount + overlayCount + regularCount; + int activeCount = activeMasterCount + activeMediumMasterCount + + activeLightMasterCount + activeRegularCount; + int totalCount = masterCount + mediumMasterCount + lightMasterCount + regularCount; ui.counter->display(activeVisibleCount); ui.counter->setToolTip( @@ -105,8 +105,8 @@ void PluginListView::updatePluginCount() "ESPs:%7 %8" "ESMs+ESPs:%9 %10" + "ESHs:%11 %12" "ESLs:%5 %6" - "Overlay:%11 %12" "") .arg(activeCount) .arg(totalCount) @@ -118,8 +118,8 @@ void PluginListView::updatePluginCount() .arg(regularCount) .arg(activeMasterCount + activeRegularCount) .arg(masterCount + regularCount) - .arg(activeOverlayCount) - .arg(overlayCount)); + .arg(activeMediumMasterCount) + .arg(mediumMasterCount)); } void PluginListView::onFilterChanged(const QString& filter) -- cgit v1.3.1