mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
more beautiful arrows; fixed server bug regarding facedown cards
This commit is contained in:
parent
2d57715a6e
commit
89fe7d2d69
4 changed files with 42 additions and 11 deletions
|
|
@ -11,7 +11,7 @@
|
|||
#include "protocol_datastructures.h"
|
||||
|
||||
CardItem::CardItem(Player *_owner, const QString &_name, int _cardid, QGraphicsItem *parent)
|
||||
: AbstractCardItem(_name, parent), owner(_owner), id(_cardid), attacking(false), facedown(false), counters(0), doesntUntap(false), dragItem(NULL)
|
||||
: AbstractCardItem(_name, parent), owner(_owner), id(_cardid), attacking(false), facedown(false), counters(0), doesntUntap(false), beingPointedAt(false), dragItem(NULL)
|
||||
{
|
||||
owner->addCard(this);
|
||||
}
|
||||
|
|
@ -27,6 +27,8 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||
AbstractCardItem::paint(painter, option, widget);
|
||||
if (counters)
|
||||
paintNumberEllipse(counters, painter);
|
||||
if (beingPointedAt)
|
||||
painter->fillRect(boundingRect(), QBrush(QColor(255, 0, 0, 100)));
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
|
|
@ -61,6 +63,12 @@ void CardItem::setDoesntUntap(bool _doesntUntap)
|
|||
doesntUntap = _doesntUntap;
|
||||
}
|
||||
|
||||
void CardItem::setBeingPointedAt(bool _beingPointedAt)
|
||||
{
|
||||
beingPointedAt = _beingPointedAt;
|
||||
update();
|
||||
}
|
||||
|
||||
void CardItem::resetState()
|
||||
{
|
||||
attacking = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue