mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 02:23:55 -07:00
table grid improvement, unfinished
This commit is contained in:
parent
914261df11
commit
0d774b5d48
16 changed files with 231 additions and 289 deletions
|
|
@ -6,11 +6,11 @@
|
|||
class TableZone : public CardZone {
|
||||
private:
|
||||
int width, height;
|
||||
QList<QList<QPoint> > gridPoints;
|
||||
QPixmap bgPixmap;
|
||||
public:
|
||||
static const int gridPointsPerCardX = 2;
|
||||
static const int gridPointsPerCardY = 3;
|
||||
static const int gridPointsPerCardY = 1;
|
||||
static const int paddingY = 20;
|
||||
|
||||
TableZone(Player *_p, QGraphicsItem *parent = 0);
|
||||
QRectF boundingRect() const;
|
||||
|
|
@ -18,6 +18,7 @@ public:
|
|||
void reorganizeCards();
|
||||
void toggleTapped();
|
||||
void handleDropEvent(int cardId, CardZone *startZone, const QPoint &dropPoint, bool faceDown);
|
||||
void handleDropEventByGrid(int cardId, CardZone *startZone, const QPoint &gridPoint, bool faceDown);
|
||||
CardItem *getCardFromGrid(const QPoint &gridPoint) const;
|
||||
QPointF mapFromGrid(const QPoint &gridPoint) const;
|
||||
QPoint mapToGrid(const QPointF &mapPoint) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue