]> Shamusworld >> Repos - warehouse-man-deluxe/blobdiff - src/mainwin.cpp
Added level editor.
[warehouse-man-deluxe] / src / mainwin.cpp
index 010f27f7d63f78ab6652bfd87743b3f5c4d4d8f4..a4aec01054e143afd19db13a563d66f235bbac5f 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdlib.h>                    // For rand()
 #include <time.h>                      // For time()
 #include "gameboard.h"
+#include "editorwindow.h"      // Actual mouse/drawing window
 #include "gamewidget.h"                // Actual mouse/drawing window
 //#include "resource.h"
 //#include "optiondlg.h"               // Options dialog class
@@ -30,6 +31,12 @@ MainWin::MainWin()
        setWindowTitle("Warehouse Man Deluxe");
        setWindowIcon(QIcon(":/wmd-icon.png"));
 
+//     editor = new QWindow(this);
+       editorWindow = new EditorWindow(this);
+//     editor->setCentralWidget(editorWidget);
+//     editorWidget->setFocusPolicy(Qt::StrongFocus);  // Without this, it gets no keys
+       editorWindow->show();
+
        newGame = CreateAction(tr("&New"), tr("New Game"), tr("Start a new game of Warehouse Man Deluxe"), QIcon(), QKeySequence(tr("ctrl+n")));
 //     connect(newGame, SIGNAL(triggered()), this, SLOT(OnNewGame()));
 
@@ -122,6 +129,7 @@ MainWin::MainWin()
 MainWin::~MainWin()
 {
 //     ShutDownAudio();
+       delete editorWindow;
 }