mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
Revealing a library to a player now grants that player permission to drag cards out of that library onto his own table. This permission is revoked by shuffling the library. The zone view window tracks content changes of the zone for as long as the permission lasts so that card ID changes are kept track of. This hopefully fixes issues #5 and #12.
This commit is contained in:
parent
2ce18a82f5
commit
adbb607700
30 changed files with 231 additions and 101 deletions
|
|
@ -15,10 +15,10 @@ private:
|
|||
int minRows, numberCards;
|
||||
void handleDropEvent(const QList<CardDragItem *> &dragItems, CardZone *startZone, const QPoint &dropPoint);
|
||||
CardZone *origZone;
|
||||
bool revealZone;
|
||||
bool revealZone, writeableRevealZone;
|
||||
bool sortByName, sortByType;
|
||||
public:
|
||||
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = -1, bool _revealZone = false, QGraphicsItem *parent = 0);
|
||||
ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards = -1, bool _revealZone = false, bool _writeableRevealZone = false, QGraphicsItem *parent = 0);
|
||||
~ZoneViewZone();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
|
@ -28,6 +28,9 @@ public:
|
|||
int getNumberCards() const { return numberCards; }
|
||||
void setGeometry(const QRectF &rect);
|
||||
QRectF getOptimumRect() const { return optimumRect; }
|
||||
bool getRevealZone() const { return revealZone; }
|
||||
bool getWriteableRevealZone() const { return writeableRevealZone; }
|
||||
void setWriteableRevealZone(bool _writeableRevealZone);
|
||||
public slots:
|
||||
void setSortByName(int _sortByName);
|
||||
void setSortByType(int _sortByType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue