mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 13:03:55 -07:00
card menu re-added
This commit is contained in:
parent
bf92ef87da
commit
bda7ec2186
6 changed files with 178 additions and 318 deletions
|
|
@ -45,7 +45,6 @@ class Player : public QObject, public QGraphicsItem {
|
|||
signals:
|
||||
void closeZoneView(ZoneViewZone *zone);
|
||||
void toggleZoneView(Player *player, QString zoneName, int number);
|
||||
void sigShowCardMenu(QPoint p); // XXX
|
||||
void newCardAdded(CardItem *card);
|
||||
// Log events
|
||||
void logDeckSelect(Player *player, int deckId);
|
||||
|
|
@ -84,6 +83,8 @@ public slots:
|
|||
void actSayMessage();
|
||||
private slots:
|
||||
void updateBoundingRect();
|
||||
void cardMenuAction();
|
||||
void actSetCounters();
|
||||
private:
|
||||
QMenu *playerMenu, *handMenu, *graveMenu, *rfgMenu, *libraryMenu, *sbMenu, *countersMenu, *sayMenu;
|
||||
QAction *aMoveHandToTopLibrary, *aMoveHandToBottomLibrary, *aMoveHandToGrave, *aMoveHandToRfg,
|
||||
|
|
@ -93,6 +94,25 @@ private:
|
|||
*aDrawCard, *aDrawCards, *aMulligan, *aShuffle,
|
||||
*aUntapAll, *aRollDie, *aCreateToken;
|
||||
|
||||
typedef void (Player::*CardMenuHandler)(CardItem *card);
|
||||
QHash<QAction *, CardMenuHandler> cardMenuHandlers;
|
||||
|
||||
QMenu *cardMenu, *moveMenu;
|
||||
QAction *aTap, *aUntap, *aDoesntUntap, *aFlip, *aAddCounter, *aRemoveCounter, *aSetCounters,
|
||||
*aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToGraveyard, *aMoveToExile;
|
||||
|
||||
|
||||
void actTap(CardItem *card);
|
||||
void actUntap(CardItem *card);
|
||||
void actDoesntUntap(CardItem *card);
|
||||
void actFlip(CardItem *card);
|
||||
void actAddCounter(CardItem *card);
|
||||
void actRemoveCounter(CardItem *card);
|
||||
void actMoveToTopLibrary(CardItem *card);
|
||||
void actMoveToBottomLibrary(CardItem *card);
|
||||
void actMoveToGraveyard(CardItem *card);
|
||||
void actMoveToExile(CardItem *card);
|
||||
|
||||
int defaultNumberTopCards;
|
||||
int mulliganCards;
|
||||
QString name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue