Took 6 minutes

Took 22 seconds
This commit is contained in:
Lukas Brübach 2025-09-12 00:42:57 +02:00
parent cce6a9d663
commit 5401efe245
8 changed files with 97 additions and 79 deletions

View file

@ -7,7 +7,8 @@
#include <QMenu>
class Player;
class GraveyardMenu : public TearOffMenu {
class GraveyardMenu : public TearOffMenu
{
Q_OBJECT
public:
explicit GraveyardMenu(Player *player, QWidget *parent = nullptr);

View file

@ -19,9 +19,18 @@ public:
void setShortcutsInactive();
// expose useful actions/menus if PlayerMenu needs them
QMenu* revealHandMenu() const { return mRevealHand; }
QMenu* revealRandomHandCardMenu() const { return mRevealRandomHandCard; }
QMenu* moveHandMenu() const { return mMoveHandMenu; }
QMenu *revealHandMenu() const
{
return mRevealHand;
}
QMenu *revealRandomHandCardMenu() const
{
return mRevealRandomHandCard;
}
QMenu *moveHandMenu() const
{
return mMoveHandMenu;
}
private:
Player *player;
@ -40,5 +49,4 @@ private:
QAction *aMoveHandToRfg = nullptr;
};
#endif // COCKATRICE_HAND_MENU_H

View file

@ -37,9 +37,18 @@ public:
}
// expose useful actions/menus if PlayerMenu needs them
QMenu* revealLibrary() const { return mRevealLibrary; }
QMenu* lendLibraryMenu() const { return mLendLibrary; }
QMenu* revealTopCardMenu() const { return mRevealTopCard; }
QMenu *revealLibrary() const
{
return mRevealLibrary;
}
QMenu *lendLibraryMenu() const
{
return mLendLibrary;
}
QMenu *revealTopCardMenu() const
{
return mRevealTopCard;
}
QMenu *topLibraryMenu = nullptr;
QMenu *bottomLibraryMenu = nullptr;

View file

@ -84,8 +84,7 @@ public:
private:
Player *player;
QMenu *sbMenu, *countersMenu, *sayMenu, *createPredefinedTokenMenu, *mCustomZones,
*mCardCounters;
QMenu *sbMenu, *countersMenu, *sayMenu, *createPredefinedTokenMenu, *mCustomZones, *mCardCounters;
HandMenu *handMenu;
LibraryMenu *libraryMenu;
GraveyardMenu *graveMenu;
@ -98,9 +97,9 @@ private:
QAction *aViewSideboard, *aUntapAll, *aRollDie, *aCreateToken, *aCreateAnotherToken;
QList<QAction *> aAddCounter, aSetCounter, aRemoveCounter;
QAction *aPlay, *aPlayFacedown, *aHide, *aTap, *aDoesntUntap, *aAttach, *aUnattach, *aDrawArrow, *aSetAnnotation, *aFlip, *aPeek, *aClone,
*aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToHand, *aMoveToGraveyard, *aMoveToExile,
*aMoveToXfromTopOfLibrary, *aSelectAll, *aSelectRow, *aSelectColumn, *aIncrementAllCardCounters;
QAction *aPlay, *aPlayFacedown, *aHide, *aTap, *aDoesntUntap, *aAttach, *aUnattach, *aDrawArrow, *aSetAnnotation,
*aFlip, *aPeek, *aClone, *aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToHand, *aMoveToGraveyard,
*aMoveToExile, *aMoveToXfromTopOfLibrary, *aSelectAll, *aSelectRow, *aSelectColumn, *aIncrementAllCardCounters;
bool shortcutsActive;
QStringList predefinedTokens;

View file

@ -3,7 +3,8 @@
#include <QMenu>
class Player;
class PtMenu : public QMenu {
class PtMenu : public QMenu
{
Q_OBJECT
@ -23,7 +24,6 @@ public:
QAction *aDecPT = nullptr;
QAction *aSetPT = nullptr;
QAction *aResetPT = nullptr;
};
#endif // COCKATRICE_PT_MENU_H

View file

@ -7,7 +7,8 @@
#include <QMenu>
class Player;
class RfgMenu : public TearOffMenu {
class RfgMenu : public TearOffMenu
{
Q_OBJECT
public:
explicit RfgMenu(Player *player, QWidget *parent = nullptr);