mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Updated static variable name
+ Updated DELTA variable to more suitable name: ROTATION_DEGREES_PER_FRAME
This commit is contained in:
parent
c130ee92fa
commit
097090ac1c
2 changed files with 4 additions and 5 deletions
|
|
@ -364,11 +364,11 @@ void CardItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
|||
|
||||
bool CardItem::animationEvent()
|
||||
{
|
||||
int delta = DELTA;
|
||||
int rotation = ROTATION_DEGREES_PER_FRAME;
|
||||
if (!tapped)
|
||||
delta *= -1;
|
||||
rotation *= -1;
|
||||
|
||||
tapAngle += delta;
|
||||
tapAngle += rotation;
|
||||
|
||||
setTransform(QTransform().translate(CARD_WIDTH_HALF, CARD_HEIGHT_HALF).rotate(tapAngle).translate(-CARD_WIDTH_HALF, -CARD_HEIGHT_HALF));
|
||||
setHovered(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue