summaryrefslogtreecommitdiff
path: root/src/modlist.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-21 19:20:24 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-21 19:20:45 +0100
commit0803920486ff62cccd79374b9b68084b880f010c (patch)
tree4db2f8c2388cf0ce0d8f7275da5ba5abad8ea84b /src/modlist.h
parent7c9d3777c28f79b1ae7cdbda107493493ca1ba2a (diff)
Add method to retrieve priority of mods in ModList.
Diffstat (limited to 'src/modlist.h')
-rw-r--r--src/modlist.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/modlist.h b/src/modlist.h
index 242d185f..68316613 100644
--- a/src/modlist.h
+++ b/src/modlist.h
@@ -335,6 +335,21 @@ signals:
private:
+ // the priority of backups and overwrite for sorting (and display, although
+ // those are not displayed), these do not correspond to the actual priority
+ // in the mod list
+ //
+ static constexpr int BACKUP_PRIORITY = -1;
+ static constexpr int OVERWRITE_PRIORITY = std::numeric_limits<int>::max();
+
+ // retrieve the priority of a mod for the purpose of display (i.e. sorting
+ // or grouping)
+ //
+ // this can be different from the priority in the profile (e.g. for backups
+ // or overwrite)
+ //
+ int modPriority(unsigned int index) const;
+
// retrieve the display name of a mod or convert from a user-provided
// name to internal name
//
@@ -361,13 +376,6 @@ private:
private:
- // the priority of backups and overwrite for sorting (and display, although
- // those are not displayed), these do not correspond to the actual priority
- // in the mod list
- //
- static constexpr int BACKUP_PRIORITY = -1;
- static constexpr int OVERWRITE_PRIORITY = std::numeric_limits<int>::max();
-
struct TModInfo {
TModInfo(unsigned int index, ModInfo::Ptr modInfo)
: modInfo(modInfo), nameOrder(index), priorityOrder(0), modIDOrder(0), categoryOrder(0) {}