diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2017-11-30 20:55:00 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-30 20:55:00 -0600 |
| commit | c55a923bb8b9b66661f32beed8445602400ef318 (patch) | |
| tree | 850ead2730c8ab50babc865a505a513d8fba5f46 /src/modinforegular.cpp | |
| parent | 7ec0b79eb49a27a3516d799a80d57000cde344da (diff) | |
| parent | 797a007eab2695c231a00240225d77b3a9928992 (diff) | |
Merge pull request #132 from Silarn/mainline_dev
Numerous updates
Diffstat (limited to 'src/modinforegular.cpp')
| -rw-r--r-- | src/modinforegular.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index 1194f604..9d94002b 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -420,6 +420,9 @@ std::vector<ModInfo::EFlag> ModInfoRegular::getFlags() const if (m_Notes.length() != 0) { result.push_back(ModInfo::FLAG_NOTES); } + if (m_PluginSelected) { + result.push_back(ModInfo::FLAG_PLUGIN_SELECTED); + } return result; } @@ -458,6 +461,8 @@ std::vector<ModInfo::EContent> ModInfoRegular::getContents() const m_CachedContent.push_back(CONTENT_SCRIPT); if (dir.exists("SkyProc Patchers")) m_CachedContent.push_back(CONTENT_SKYPROC); + if (dir.exists("MCM")) + m_CachedContent.push_back(CONTENT_MCM); m_LastContentCheck = QTime::currentTime(); } @@ -469,7 +474,12 @@ std::vector<ModInfo::EContent> ModInfoRegular::getContents() const int ModInfoRegular::getHighlight() const { - return isValid() ? HIGHLIGHT_NONE: HIGHLIGHT_INVALID; + if (!isValid()) + return HIGHLIGHT_INVALID; + auto flags = getFlags(); + if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_PLUGIN_SELECTED) != flags.end()) + return HIGHLIGHT_PLUGIN; + return HIGHLIGHT_NONE; } |
