mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 12:03:55 -07:00
card tap/untap animation; misc fixes
This commit is contained in:
parent
28a77f10e4
commit
db2c2d1b15
9 changed files with 98 additions and 38 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
class CardInfo;
|
||||
class Player;
|
||||
class QTimer;
|
||||
|
||||
const int CARD_WIDTH = 72;
|
||||
const int CARD_HEIGHT = 102;
|
||||
|
|
@ -15,8 +16,12 @@ protected:
|
|||
CardInfo *info;
|
||||
QString name;
|
||||
bool tapped;
|
||||
int tapAngle;
|
||||
QString color;
|
||||
private:
|
||||
QTimer *animationTimer;
|
||||
private slots:
|
||||
void animationEvent();
|
||||
void pixmapUpdated();
|
||||
signals:
|
||||
void hovered(AbstractCardItem *card);
|
||||
|
|
@ -33,7 +38,7 @@ public:
|
|||
QString getColor() const { return color; }
|
||||
void setColor(const QString &_color);
|
||||
bool getTapped() const { return tapped; }
|
||||
void setTapped(bool _tapped);
|
||||
void setTapped(bool _tapped, bool canAnimate = false);
|
||||
void processHoverEvent();
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue