Restore card counter color in menu.

Took 5 minutes
This commit is contained in:
Lukas Brübach 2026-06-06 03:03:03 +02:00
parent 789dc05307
commit d0fc646663

View file

@ -103,37 +103,21 @@ CardMenu::CardMenu(PlayerGraphicsItem *_player, const CardItem *_card, bool _sho
// Card counters // Card counters
for (int i = 0; i < 6; ++i) { for (int i = 0; i < 6; ++i) {
aAddCounter.append(makeAction(this, [actions, sel, i]() { actions->actAddCardCounter(sel(), i); }));
aRemoveCounter.append(makeAction(this, [actions, sel, i]() { actions->actRemoveCardCounter(sel(), i); }));
aSetCounter.append(makeAction(this, [actions, sel, i]() { actions->actSetCardCounter(sel(), i); }));
}
/*for (int i = 0; i < 6; ++i) {
QColor color = SettingsCache::instance().cardCounters().color(i); QColor color = SettingsCache::instance().cardCounters().color(i);
QIcon circleIcon = createCircleIcon(color); QIcon circleIcon = createCircleIcon(color);
auto *tempAddCounter = new QAction(this); auto *addAction = makeAction(this, [actions, sel, i]() { actions->actAddCardCounter(sel(), i); });
tempAddCounter->setIconVisibleInMenu(true); addAction->setIcon(circleIcon);
tempAddCounter->setIcon(circleIcon); aAddCounter.append(addAction);
auto *tempRemoveCounter = new QAction(this); auto *removeAction = makeAction(this, [actions, sel, i]() { actions->actRemoveCardCounter(sel(), i); });
tempRemoveCounter->setIconVisibleInMenu(true); removeAction->setIcon(circleIcon);
tempRemoveCounter->setIcon(circleIcon); aRemoveCounter.append(removeAction);
auto *tempSetCounter = new QAction(this); auto *setAction = makeAction(this, [actions, sel, i]() { actions->actSetCardCounter(sel(), i); });
tempSetCounter->setIconVisibleInMenu(true); setAction->setIcon(circleIcon);
tempSetCounter->setIcon(circleIcon); aSetCounter.append(setAction);
}
aAddCounter.append(tempAddCounter);
aRemoveCounter.append(tempRemoveCounter);
aSetCounter.append(tempSetCounter);
connect(tempAddCounter, &QAction::triggered, playerActions,
[playerActions, i] { playerActions->actAddCardCounter(i); });
connect(tempRemoveCounter, &QAction::triggered, playerActions,
[playerActions, i] { playerActions->actRemoveCardCounter(i); });
connect(tempSetCounter, &QAction::triggered, playerActions,
[playerActions, i] { playerActions->actSetCardCounter(i); });
}*/
setShortcutsActive(); setShortcutsActive();