mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 00:12:15 -07:00
Refactor player menus into helper classes.
Took 2 hours 6 minutes Took 11 minutes
This commit is contained in:
parent
ff7ce39841
commit
cce6a9d663
16 changed files with 893 additions and 560 deletions
33
cockatrice/src/game/player/player_menu/grave_menu.h
Normal file
33
cockatrice/src/game/player/player_menu/grave_menu.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef COCKATRICE_GRAVE_MENU_H
|
||||
#define COCKATRICE_GRAVE_MENU_H
|
||||
|
||||
#include "../../../client/tearoff_menu.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
||||
class Player;
|
||||
class GraveyardMenu : public TearOffMenu {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GraveyardMenu(Player* player, QWidget* parent = nullptr);
|
||||
void createMoveActions();
|
||||
void createViewActions();
|
||||
void retranslateUi();
|
||||
void setShortcutsActive();
|
||||
void setShortcutsInactive();
|
||||
|
||||
QMenu * mRevealRandomGraveyardCard = nullptr;
|
||||
QMenu* moveGraveMenu = nullptr;
|
||||
|
||||
QAction* aViewGraveyard = nullptr;
|
||||
QAction* aMoveGraveToTopLibrary = nullptr;
|
||||
QAction* aMoveGraveToBottomLibrary = nullptr;
|
||||
QAction* aMoveGraveToHand = nullptr;
|
||||
QAction* aMoveGraveToRfg = nullptr;
|
||||
|
||||
private:
|
||||
Player* player;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_GRAVE_MENU_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue