summaryrefslogtreecommitdiff
path: root/noncore/games/tetrix/qtetrix.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/tetrix/qtetrix.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/tetrix/qtetrix.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/games/tetrix/qtetrix.cpp b/noncore/games/tetrix/qtetrix.cpp
index f649894..6d29c3f 100644
--- a/noncore/games/tetrix/qtetrix.cpp
+++ b/noncore/games/tetrix/qtetrix.cpp
@@ -23,4 +23,5 @@
#include <qpe/resource.h>
+#include <qpe/config.h>
#include <qapplication.h>
@@ -28,5 +29,7 @@
#include <qdatetime.h>
#include <qlayout.h>
+#include <qstring.h>
+#include "ohighscoredlg.h"
@@ -162,7 +165,11 @@ QTetrix::QTetrix( QWidget *parent, const char *name, WFlags f )
void QTetrix::gameOver()
{
+ OHighscore *hs = new OHighscore( showScore->text().toInt() , showLevel->text().toInt() );
+ if ( hs->isNewhighscore )
+ hs->insertData( hs->getName(), showScore->text().toInt() , showLevel->text().toInt() );
+ OHighscoreDialog hscdlg( hs, this, "OHighscoreDialog", true );
+ hscdlg.exec();
}
-
void QTetrix::quit()
{