Commit 182f7318 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add endgame support.

Patch from Kyryll A Mirnenko aka Mirya (2011)
CCBUG: 129791
parent 5824b823
......@@ -76,6 +76,7 @@ void KLinesMainWindow::setupActions()
KStandardGameAction::gameNew(this, SLOT(startGame()), actionCollection());
KStandardGameAction::highscores(this, SLOT(viewHighScore()), actionCollection());
KStandardGameAction::quit(this, SLOT(close()), actionCollection());
KStandardGameAction::end(mwidget->scene(), SLOT(endGame()), actionCollection());
// Move
KStandardGameAction::undo(mwidget->scene(), SLOT(undo()), actionCollection());
......
......@@ -116,6 +116,12 @@ KLinesScene::~KLinesScene()
delete m_animator;
}
void KLinesScene::endGame()
{
gameOverHandler();
}
void KLinesScene::resizeScene(int width,int height)
{
// store focus item field pos (calculated using old cellSize)
......
......@@ -100,6 +100,10 @@ public Q_SLOTS:
* Starts new game
*/
void startNewGame();
/**
* Ends game
*/
void endGame();
/**
* Ends current and starts next turn explicitly
*/
......
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