mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
don't blink highlighted phase when backwards skipping in replays (#5185)
This commit is contained in:
parent
83409c32c4
commit
bd60a9fd2e
3 changed files with 1 additions and 31 deletions
|
|
@ -648,8 +648,7 @@ void TabGame::replayRewind()
|
||||||
messageLog->clearChat();
|
messageLog->clearChat();
|
||||||
|
|
||||||
// reset phase markers
|
// reset phase markers
|
||||||
currentPhase = -1;
|
setActivePhase(-1);
|
||||||
phasesToolbar->reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabGame::incrementGameTime()
|
void TabGame::incrementGameTime()
|
||||||
|
|
|
||||||
|
|
@ -86,23 +86,6 @@ void PhaseButton::updateAnimation()
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Immediately resets the button to the inactive state, without going through the animation.
|
|
||||||
*/
|
|
||||||
void PhaseButton::reset()
|
|
||||||
{
|
|
||||||
activeAnimationTimer->stop();
|
|
||||||
active = false;
|
|
||||||
|
|
||||||
if (highlightable) {
|
|
||||||
activeAnimationCounter = 0;
|
|
||||||
} else {
|
|
||||||
activeAnimationCounter = 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhaseButton::mousePressEvent(QGraphicsSceneMouseEvent * /*event*/)
|
void PhaseButton::mousePressEvent(QGraphicsSceneMouseEvent * /*event*/)
|
||||||
{
|
{
|
||||||
emit clicked();
|
emit clicked();
|
||||||
|
|
@ -268,16 +251,6 @@ void PhasesToolbar::phaseButtonClicked()
|
||||||
emit sendGameCommand(cmd, -1);
|
emit sendGameCommand(cmd, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Immediately resets the toolbar to its initial state, with all phases inactive.
|
|
||||||
*/
|
|
||||||
void PhasesToolbar::reset()
|
|
||||||
{
|
|
||||||
for (auto &i : buttonList) {
|
|
||||||
i->reset();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PhasesToolbar::actNextTurn()
|
void PhasesToolbar::actNextTurn()
|
||||||
{
|
{
|
||||||
emit sendGameCommand(Command_NextTurn(), -1);
|
emit sendGameCommand(Command_NextTurn(), -1);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ public:
|
||||||
{
|
{
|
||||||
return active;
|
return active;
|
||||||
}
|
}
|
||||||
void reset();
|
|
||||||
void triggerDoubleClickAction();
|
void triggerDoubleClickAction();
|
||||||
signals:
|
signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|
@ -86,7 +85,6 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void setActivePhase(int phase);
|
void setActivePhase(int phase);
|
||||||
void triggerPhaseAction(int phase);
|
void triggerPhaseAction(int phase);
|
||||||
void reset();
|
|
||||||
private slots:
|
private slots:
|
||||||
void phaseButtonClicked();
|
void phaseButtonClicked();
|
||||||
void actNextTurn();
|
void actNextTurn();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue