summaryrefslogtreecommitdiff
path: root/noncore/games/tetrix/qtetrixb.cpp
authordrw <drw>2004-12-20 14:49:49 (UTC)
committer drw <drw>2004-12-20 14:49:49 (UTC)
commit29b27cf61a7cb862a0236c8b319ff1843669142c (patch) (side-by-side diff)
treea2dee12e4241103259840385020ae317c8814d69 /noncore/games/tetrix/qtetrixb.cpp
parent480a3ae1b4ed502fbd75e345c41ad4c469eff140 (diff)
downloadopie-29b27cf61a7cb862a0236c8b319ff1843669142c.zip
opie-29b27cf61a7cb862a0236c8b319ff1843669142c.tar.gz
opie-29b27cf61a7cb862a0236c8b319ff1843669142c.tar.bz2
Reapply fix for bug #1017 - Tetrix on high resolution screens
Diffstat (limited to 'noncore/games/tetrix/qtetrixb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/tetrix/qtetrixb.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/games/tetrix/qtetrixb.cpp b/noncore/games/tetrix/qtetrixb.cpp
index 3c179df..8c41fb2 100644
--- a/noncore/games/tetrix/qtetrixb.cpp
+++ b/noncore/games/tetrix/qtetrixb.cpp
@@ -51,16 +51,17 @@ QTetrixBoard::QTetrixBoard( QWidget *p, const char *name )
updateTimeoutTime(); // Sets timeoutTime
}
void QTetrixBoard::startGame(int gameType,int fillRandomLines)
{
if ( isPaused )
return; // ignore if game is paused
noGame = FALSE;
+
GenericTetrix::startGame( gameType, fillRandomLines );
// Note that the timer is started by updateLevel!
}
void QTetrixBoard::pause()
{
if ( noGame ) // game not active
@@ -201,18 +202,21 @@ void QTetrixBoard::drawContents( QPainter *p )
updateBoard( x1, y1, x2, y2, TRUE );
paint = 0; // reset widget painter
return;
}
void QTetrixBoard::resizeEvent(QResizeEvent *e)
{
QSize sz = e->size();
+
blockWidth = (sz.width() - 2)/10;
blockHeight = (sz.height() - 2)/22;
+/* blockWidth > blockHeight ? blockWidth = blockHeight
+ : blockHeight = blockWidth;*/
xOffset = 1;
//yOffset = 1;
yOffset = (sz.height() - 2) - (blockHeight *22);
}
void QTetrixBoard::keyPressEvent( QKeyEvent *e )
{
if ( noGame || isPaused || waitingAfterLine )