mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
card menu improvement, change controller support (bug #3)
This commit is contained in:
parent
4f9252c65c
commit
231887367c
25 changed files with 305 additions and 205 deletions
|
|
@ -30,12 +30,21 @@ private:
|
|||
QList<CardItem *> attachedCards;
|
||||
|
||||
QList<QAction *> aAddCounter, aSetCounter, aRemoveCounter;
|
||||
QAction *aTap, *aUntap, *aDoesntUntap, *aAttach, *aUnattach, *aSetPT, *aSetAnnotation, *aFlip, *aClone,
|
||||
QAction *aPlay,
|
||||
*aTap, *aUntap, *aDoesntUntap, *aAttach, *aUnattach, *aSetPT, *aSetAnnotation, *aFlip, *aClone,
|
||||
*aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToGraveyard, *aMoveToExile;
|
||||
QMenu *cardMenu, *moveMenu;
|
||||
|
||||
void playCard(QGraphicsSceneMouseEvent *event);
|
||||
void playCard(bool faceDown);
|
||||
void prepareDelete();
|
||||
private slots:
|
||||
void cardMenuAction();
|
||||
void actCardCounterTrigger();
|
||||
void actAttach();
|
||||
void actUnattach();
|
||||
void actSetPT();
|
||||
void actSetAnnotation();
|
||||
void actPlay();
|
||||
public slots:
|
||||
void deleteLater();
|
||||
public:
|
||||
|
|
@ -45,13 +54,14 @@ public:
|
|||
~CardItem();
|
||||
void retranslateUi();
|
||||
CardZone *getZone() const { return zone; }
|
||||
void setZone(CardZone *_zone) { zone = _zone; }
|
||||
void setZone(CardZone *_zone);
|
||||
QMenu *getCardMenu() const { return cardMenu; }
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
QPoint getGridPoint() const { return gridPoint; }
|
||||
void setGridPoint(const QPoint &_gridPoint) { gridPoint = _gridPoint; }
|
||||
QPoint getGridPos() const { return gridPoint; }
|
||||
Player *getOwner() const { return owner; }
|
||||
void setOwner(Player *_owner) { owner = _owner; }
|
||||
int getId() const { return id; }
|
||||
void setId(int _id) { id = _id; }
|
||||
bool getAttacking() const { return attacking; }
|
||||
|
|
@ -75,6 +85,7 @@ public:
|
|||
const QList<CardItem *> &getAttachedCards() const { return attachedCards; }
|
||||
void resetState();
|
||||
void processCardInfo(ServerInfo_Card *info);
|
||||
void updateCardMenu();
|
||||
|
||||
CardDragItem *createDragItem(int _id, const QPointF &_pos, const QPointF &_scenePos, bool faceDown);
|
||||
void deleteDragItem();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue