mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 05:53:59 -07:00
[Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem (#6944)
* [Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem Took 4 minutes Took 48 seconds * Drop early return. Took 1 hour 13 minutes Took 2 minutes Took 1 minute * Delete player view. Took 37 seconds * Restore card counter color in menu. Took 5 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
e674a39b87
commit
9e03f82616
28 changed files with 538 additions and 368 deletions
|
|
@ -8,15 +8,20 @@
|
|||
#define COCKATRICE_CARD_MENU_H
|
||||
|
||||
#include <QMenu>
|
||||
#include <libcockatrice/utility/card_ref.h>
|
||||
|
||||
class CardItem;
|
||||
class PlayerGraphicsItem;
|
||||
class PlayerLogic;
|
||||
class CardMenu : public QMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
signals:
|
||||
void cardInfoRequested(const CardRef &cardRef);
|
||||
|
||||
public:
|
||||
explicit CardMenu(PlayerLogic *player, const CardItem *card, bool shortcutsActive);
|
||||
explicit CardMenu(PlayerGraphicsItem *player, const CardItem *card, bool shortcutsActive);
|
||||
void removePlayer(PlayerLogic *playerToRemove);
|
||||
void createTableMenu(bool canModifyCard);
|
||||
void createStackMenu(bool canModifyCard);
|
||||
|
|
@ -41,7 +46,7 @@ public:
|
|||
QList<QAction *> aAddCounter, aSetCounter, aRemoveCounter;
|
||||
|
||||
private:
|
||||
PlayerLogic *player;
|
||||
PlayerGraphicsItem *player;
|
||||
const CardItem *card;
|
||||
QList<QPair<QString, int>> playersInfo;
|
||||
bool shortcutsActive;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue