mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 09:35:08 -07:00
[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:
parent
b70f770633
commit
3f9dbdb33b
12 changed files with 126 additions and 19 deletions
|
|
@ -45,6 +45,8 @@ GameView::GameView(GameScene *scene, QWidget *parent) : QGraphicsView(scene, par
|
|||
connect(scene, &GameScene::sigResizeRubberBand, this, &GameView::resizeRubberBand);
|
||||
connect(scene, &GameScene::sigStopRubberBand, this, &GameView::stopRubberBand);
|
||||
connect(scene, &QGraphicsScene::selectionChanged, this, [this]() { updateTotalSelectionCount(); });
|
||||
connect(&SettingsCache::instance(), &SettingsCache::tallyTypeChanged, this,
|
||||
[this] { updateTotalSelectionCount(); });
|
||||
|
||||
setFocusDisabled(SettingsCache::instance().getKeepGameChatFocus());
|
||||
connect(&SettingsCache::instance(), &SettingsCache::keepGameChatFocusChanged, this, &GameView::setFocusDisabled);
|
||||
|
|
@ -246,8 +248,7 @@ void GameView::updateTotalSelectionCount(const QSize &viewSize)
|
|||
totalCountLabel->show();
|
||||
}
|
||||
|
||||
TallyType tallyType =
|
||||
SettingsCache::instance().getShowSubtypeSelectionTally() ? TallyType::Subtypes : TallyType::None;
|
||||
TallyType tallyType = Tally::intToType(SettingsCache::instance().getTallyType());
|
||||
|
||||
GameScene *gameScene = static_cast<GameScene *>(scene());
|
||||
QList<TallyRow> entries = Tally::compute(gameScene->selectedCards(), tallyType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue