|
Last change
on this file since 624 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
|
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
|
File size:
650 bytes
|
| Line | |
|---|
| 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 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.