summaryrefslogtreecommitdiff
path: root/noncore/games/tetrix/qtetrix.cpp
authorcniehaus <cniehaus>2003-03-15 20:50:41 (UTC)
committer cniehaus <cniehaus>2003-03-15 20:50:41 (UTC)
commit917fb7d2dca76f5c2c5c86553be0fcc2832c3435 (patch) (side-by-side diff)
tree972e7e2e17496cb4ab618f4a07035d2c2b6f20c8 /noncore/games/tetrix/qtetrix.cpp
parentdfe0e1302aa2a366cfa2a8b53102a38b7143ba4b (diff)
downloadopie-917fb7d2dca76f5c2c5c86553be0fcc2832c3435.zip
opie-917fb7d2dca76f5c2c5c86553be0fcc2832c3435.tar.gz
opie-917fb7d2dca76f5c2c5c86553be0fcc2832c3435.tar.bz2
merging with the branch.
Comments?
Diffstat (limited to 'noncore/games/tetrix/qtetrix.cpp') (more/less context) (ignore 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
@@ -22,12 +22,15 @@
#include "qtetrix.h"
#include <qpe/resource.h>
+#include <qpe/config.h>
#include <qapplication.h>
#include <qlabel.h>
#include <qdatetime.h>
#include <qlayout.h>
+#include <qstring.h>
+#include "ohighscoredlg.h"
void drawTetrixButton( QPainter *p, int x, int y, int w, int h,
@@ -161,9 +164,13 @@ 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()
{
close();