mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 21:10:01 -08:00
[Refactor] Move the active card from AbstractGame into GameScene (#7416)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
94b91be5a2
commit
4972ebcb97
6 changed files with 26 additions and 20 deletions
|
|
@ -69,6 +69,7 @@ private:
|
|||
QList<ZoneViewWidget *> zoneViews; ///< Active zone view widgets
|
||||
QSize viewSize; ///< Current view size
|
||||
QPointer<CardItem> hoveredCard; ///< Currently hovered card
|
||||
QPointer<CardItem> activeCard; ///< Card the currently open context menu targets
|
||||
QBasicTimer *animationTimer; ///< Timer for scene animations
|
||||
QHash<QObject *, IAnimatedItem *> animatedItems; ///< Items currently animating
|
||||
QHash<QObject *, QMetaObject::Connection>
|
||||
|
|
@ -108,6 +109,12 @@ public:
|
|||
/** @brief Gets all selected CardItems. */
|
||||
QList<CardItem *> selectedCards() const;
|
||||
|
||||
/** @brief Card the currently open context menu targets, or null. */
|
||||
CardItem *getActiveCard() const;
|
||||
|
||||
/** @brief Sets the card the currently open context menu targets. */
|
||||
void setActiveCard(CardItem *card);
|
||||
|
||||
/**
|
||||
* @brief Adds a player to the scene and stores their graphics item.
|
||||
* @param player Player to add.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue