[Game] Use in-game menu for tally setting (#7036)

* [Game] Use in-game menu for tally setting

* pluralize name

* fix includes

* clean up TallyMenu

* update settings

* fix guard
This commit is contained in:
RickyRister 2026-07-26 15:26:02 -07:00 committed by GitHub
parent b70f770633
commit 3f9dbdb33b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 126 additions and 19 deletions

View file

@ -313,7 +313,7 @@ SettingsCache::SettingsCache()
showDragSelectionCount = settings->value("interface/showlassoselectioncount", true).toBool();
showTotalSelectionCount = settings->value("interface/showpersistentselectioncount", true).toBool();
showSubtypeSelectionTally = settings->value("interface/showsubtypeselectiontally", true).toBool();
tallyType = settings->value("interface/tallyType", 0).toInt();
showShortcuts = settings->value("menu/showshortcuts", true).toBool();
showGameSelectorFilterToolbar = settings->value("menu/showgameselectorfiltertoolbar", true).toBool();
@ -1403,10 +1403,15 @@ void SettingsCache::setShowTotalSelectionCount(QT_STATE_CHANGED_T _showTotalSele
settings->setValue("interface/showpersistentselectioncount", showTotalSelectionCount);
}
void SettingsCache::setShowSubtypeSelectionTally(QT_STATE_CHANGED_T _showSubtypeSelectionTally)
void SettingsCache::setTallyType(int value)
{
showSubtypeSelectionTally = static_cast<bool>(_showSubtypeSelectionTally);
settings->setValue("interface/showsubtypeselectiontally", showSubtypeSelectionTally);
if (tallyType == value) {
return;
}
tallyType = value;
settings->setValue("interface/tallyType", value);
emit tallyTypeChanged(value);
}
void SettingsCache::loadPaths()