mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Don't stop/start, just start.
Took 29 minutes
This commit is contained in:
parent
594985bf9e
commit
6d8cb36adf
2 changed files with 1 additions and 15 deletions
|
|
@ -18,6 +18,7 @@ GameState::GameState(AbstractGame *parent,
|
|||
gameTimer = new QTimer(this);
|
||||
gameTimer->setInterval(1000);
|
||||
connect(gameTimer, &QTimer::timeout, this, &GameState::incrementGameTime);
|
||||
gameTimer->start();
|
||||
}
|
||||
|
||||
void GameState::incrementGameTime()
|
||||
|
|
@ -37,14 +38,4 @@ void GameState::setGameTime(int _secondsElapsed)
|
|||
emit updateTimeElapsedLabel(QString::number(hours).rightJustified(2, '0') + ":" +
|
||||
QString::number(minutes).rightJustified(2, '0') + ":" +
|
||||
QString::number(seconds).rightJustified(2, '0'));
|
||||
}
|
||||
|
||||
void GameState::startGameTimer()
|
||||
{
|
||||
gameTimer->start();
|
||||
}
|
||||
|
||||
void GameState::stopGameTimer()
|
||||
{
|
||||
gameTimer->stop();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue