Commit 3ddaa76d authored by Jan-Peter Nilsson's avatar Jan-Peter Nilsson Committed by Albert Astals Cid

Create tiles when redrawing the game board even if paused

The previous change makes pause/unpause just hide/show the tiles.
For that to work we must create tiles when redrawing even if the game is paused,
otherwise unpause without a redraw will have no tiles to show.
parent 3c01a441
......@@ -244,7 +244,7 @@ void BoardWidget::updateSpriteMap()
thissprite->moveTo(sx, sy);
}
if (thissprite) {
if (thissprite && !gamePaused) {
thissprite->show();
}
}
......@@ -304,7 +304,7 @@ void BoardWidget::updateSpriteMap()
thissprite->moveTo(sx, sy);
}
if (thissprite) {
if (thissprite && !gamePaused) {
thissprite->show();
}
}
......@@ -361,7 +361,7 @@ void BoardWidget::updateSpriteMap()
thissprite->moveTo(sx, sy);
}
if (thissprite) {
if (thissprite && !gamePaused) {
thissprite->show();
}
}
......@@ -412,7 +412,7 @@ void BoardWidget::updateSpriteMap()
thissprite->moveTo(sx, sy);
}
if (thissprite) {
if (thissprite && !gamePaused) {
thissprite->show();
}
}
......@@ -793,13 +793,9 @@ void BoardWidget::hilightTile(POSITION& Pos, bool on, bool doRepaint)
}
}
void BoardWidget::drawBoard(bool showTiles)
void BoardWidget::drawBoard(bool createTiles)
{
if (gamePaused) {
showTiles = false;
}
if (showTiles) {
if (createTiles) {
populateSpriteMap();
drawTileNumber();
} else {
......
......@@ -212,7 +212,7 @@ public slots:
/**
* Slot Description */
void drawBoard(bool showTiles = true);
void drawBoard(bool createTiles = true);
/**
* Slot Description */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment