mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 17:32:15 -07:00
[Game] Refactor CardDragItem faceDown logic (#6552)
* Rename properties and only pass forceFaceDown * [Game] Refactor CardDragItem faceDown logic * revert refactor * leave face_down unset unless forced
This commit is contained in:
parent
2828854d32
commit
2fba5dcd20
6 changed files with 18 additions and 16 deletions
|
|
@ -16,7 +16,7 @@ class CardDragItem : public AbstractCardDragItem
|
|||
Q_OBJECT
|
||||
private:
|
||||
int id;
|
||||
bool faceDown;
|
||||
bool forceFaceDown;
|
||||
bool occupied;
|
||||
CardZone *currentZone;
|
||||
|
||||
|
|
@ -24,15 +24,15 @@ public:
|
|||
CardDragItem(CardItem *_item,
|
||||
int _id,
|
||||
const QPointF &_hotSpot,
|
||||
bool _faceDown,
|
||||
bool _forceFaceDown,
|
||||
AbstractCardDragItem *parentDrag = 0);
|
||||
int getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
bool getFaceDown() const
|
||||
bool isForceFaceDown() const
|
||||
{
|
||||
return faceDown;
|
||||
return forceFaceDown;
|
||||
}
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
void updatePosition(const QPointF &cursorScenePos) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue