X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Feditorwindow.cpp;fp=src%2Feditorwindow.cpp;h=713dc740caebea5e0eb2721f00b42a140c95a4e4;hb=003638a66da61e2269e4ef398aa294c6ee02b171;hp=9c95ba17accfafabfa3e5c1d9875301d0eed83ad;hpb=195a185d42504cbface8c29911467ce8cff27229;p=warehouse-man-deluxe diff --git a/src/editorwindow.cpp b/src/editorwindow.cpp index 9c95ba1..713dc74 100644 --- a/src/editorwindow.cpp +++ b/src/editorwindow.cpp @@ -23,6 +23,7 @@ EditorWindow::EditorWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Window) down = new QPushButton("v"); add = new QPushButton("+"); remove = new QPushButton("-"); + play = new QPushButton(">"); editor = new EditorWidget(parent); list->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); @@ -44,6 +45,7 @@ EditorWindow::EditorWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Window) buttonBox->addWidget(down); buttonBox->addWidget(add); buttonBox->addWidget(remove); + buttonBox->addWidget(play); listBox->addWidget(list); listBox->addLayout(buttonBox); @@ -61,6 +63,7 @@ EditorWindow::EditorWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Window) connect(down, SIGNAL(clicked()), this, SLOT(MoveLevelDown())); connect(add, SIGNAL(clicked()), this, SLOT(AddLevel())); connect(remove, SIGNAL(clicked()), this, SLOT(DeleteLevel())); + connect(play, SIGNAL(clicked()), this, SLOT(PlayLevel())); } @@ -160,3 +163,9 @@ void EditorWindow::DeleteLevel(void) SetEditorLevel(currentRow); } + +void EditorWindow::PlayLevel(void) +{ + emit SetupLevel(&(editor->levelStorage[editor->currentLevel])); +} +