mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 17:45:09 -07:00
Fix checkmark and add red.
This commit is contained in:
parent
76c4556289
commit
1563491006
3 changed files with 24 additions and 0 deletions
|
|
@ -1777,6 +1777,15 @@ void PlayerActions::cardMenuAction(QList<CardItem *> selectedCards, CardMenuActi
|
|||
commandList.append(cmd);
|
||||
break;
|
||||
}
|
||||
case cmDoesntUntapOnce: {
|
||||
auto *cmd = new Command_SetCardAttr;
|
||||
cmd->set_zone(card->getZone()->getName().toStdString());
|
||||
cmd->set_card_id(card->getId());
|
||||
cmd->set_attribute(AttrDoesntUntapOnce);
|
||||
cmd->set_attr_value(card->getDoesntUntapOnce() ? "0" : "1");
|
||||
commandList.append(cmd);
|
||||
break;
|
||||
}
|
||||
case cmFlip: {
|
||||
auto *cmd = new Command_FlipCard;
|
||||
cmd->set_zone(card->getZone()->getName().toStdString());
|
||||
|
|
|
|||
|
|
@ -146,6 +146,20 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||
painter->restore();
|
||||
}
|
||||
|
||||
if (state->getDoesntUntapOnce()) {
|
||||
painter->save();
|
||||
|
||||
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||
|
||||
QPen pen;
|
||||
pen.setColor(Qt::red);
|
||||
pen.setWidth(0); // Cosmetic pen
|
||||
painter->setPen(pen);
|
||||
painter->drawPath(shape());
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ void Server_Card::resetState(bool keepAnnotations)
|
|||
setAnnotation(QString());
|
||||
}
|
||||
setDoesntUntap(false);
|
||||
setDoesntUntapOnce(false);
|
||||
}
|
||||
|
||||
QString Server_Card::setAttribute(CardAttribute attribute, const QString &avalue, bool allCards)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue