mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
improved appearance
This commit is contained in:
parent
8782438fcc
commit
6e94221112
20 changed files with 158 additions and 77 deletions
|
|
@ -3,8 +3,8 @@
|
|||
#include "player.h"
|
||||
#include "client.h"
|
||||
|
||||
TableZone::TableZone(Player *_p)
|
||||
: CardZone(_p, "table"), width(700), height(500)
|
||||
TableZone::TableZone(Player *_p, QGraphicsItem *parent)
|
||||
: CardZone(_p, "table", parent), width(700), height(500)
|
||||
{
|
||||
cards = new CardList(true);
|
||||
hasCardAttr = true;
|
||||
|
|
@ -19,7 +19,7 @@ void TableZone::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
painter->fillRect(boundingRect(), QColor("blue"));
|
||||
painter->fillRect(boundingRect(), QColor(0, 0, 100));
|
||||
}
|
||||
|
||||
void TableZone::addCard(CardItem *card, bool reorganize, int x, int y)
|
||||
|
|
@ -31,10 +31,12 @@ void TableZone::addCard(CardItem *card, bool reorganize, int x, int y)
|
|||
y = height - CARD_HEIGHT - y;
|
||||
card->setPos(x, y);
|
||||
}
|
||||
qDebug(QString("zValue = %1, x = %2, y = %3").arg((y + CARD_HEIGHT) * width + x + 1000).arg(x).arg(y).toLatin1());
|
||||
card->setZValue((y + CARD_HEIGHT) * width + x + 1000);
|
||||
card->setParentItem(this);
|
||||
card->setVisible(true);
|
||||
card->update(card->boundingRect());
|
||||
|
||||
}
|
||||
|
||||
void TableZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &dropPoint)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue