Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase window size and change grid position
Add an origin member to allow setting of x and y pos for GameBorder and TetrisGrid
- Loading branch information
andrew long
committed
Apr 15, 2012
1 parent
7eea9fd
commit 316c473
Showing
5 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
#include "GameBorder.h" | ||
|
||
GameBorder::GameBorder(QPointF newPosition) | ||
{ | ||
position = newPosition; | ||
} | ||
|
||
QRectF GameBorder::boundingRect() const | ||
{ | ||
return QRectF(0, 0, 305, 480); | ||
return QRectF(position.x(), position.y(), 305, 480); | ||
} | ||
|
||
void GameBorder::paint(QPainter *painter, | ||
const QStyleOptionGraphicsItem *option, | ||
QWidget *widget) | ||
{ | ||
painter->drawRect(0, 0, 305, 480); | ||
painter->drawRect(position.x(), position.y(), 305, 480); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters