0
|
1 |
function TetrixWindow(ui)
|
|
2 |
{
|
|
3 |
this.ui = ui;
|
|
4 |
|
|
5 |
var boardUi = ui.findChild("board");
|
|
6 |
boardUi.nextPieceLabel = ui.findChild("nextPieceLabel");
|
|
7 |
|
|
8 |
this.board = new TetrixBoard(boardUi);
|
|
9 |
|
|
10 |
ui.findChild("startButton").clicked.connect(this.board, this.board.start);
|
|
11 |
ui.findChild("quitButton").clicked.connect(Qt.App.quit);
|
|
12 |
ui.findChild("pauseButton").clicked.connect(this.board, this.board.pause);
|
|
13 |
boardUi.scoreChanged.connect(ui.findChild("scoreLcd")["display(int)"]);
|
|
14 |
boardUi.levelChanged.connect(ui.findChild("levelLcd")["display(int)"]);
|
|
15 |
boardUi.linesRemovedChanged.connect(ui.findChild("linesLcd")["display(int)"]);
|
|
16 |
}
|