mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 13:33:55 -07:00
Sync value too.
Took 3 minutes
This commit is contained in:
parent
46e7455d09
commit
5edcbbf80b
1 changed files with 4 additions and 1 deletions
|
|
@ -28,7 +28,10 @@ AbstractCounter::AbstractCounter(CounterState *state,
|
||||||
{
|
{
|
||||||
setAcceptHoverEvents(true);
|
setAcceptHoverEvents(true);
|
||||||
|
|
||||||
connect(state, &CounterState::valueChanged, this, [this]() { update(); });
|
connect(state, &CounterState::valueChanged, this, [this](int, int newValue) {
|
||||||
|
value = newValue;
|
||||||
|
update();
|
||||||
|
});
|
||||||
|
|
||||||
if (player->getPlayerInfo()->getLocalOrJudge()) {
|
if (player->getPlayerInfo()->getLocalOrJudge()) {
|
||||||
menu = new TearOffMenu(TranslateCounterName::getDisplayName(state->getName()));
|
menu = new TearOffMenu(TranslateCounterName::getDisplayName(state->getName()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue