From bfa661013ada083d2999e06fd3c56a80afa687e6 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 2 Apr 2009 02:48:29 -0400 Subject: Connect up the editor --- sigmodr/widgets/GameUI.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sigmodr/widgets/GameUI.cpp') diff --git a/sigmodr/widgets/GameUI.cpp b/sigmodr/widgets/GameUI.cpp index 45af24d3..4bbcf950 100644 --- a/sigmodr/widgets/GameUI.cpp +++ b/sigmodr/widgets/GameUI.cpp @@ -21,6 +21,7 @@ // Sigmodr widget includes #include "TypechartModel.h" +#include "mapeditor/WorldMapEditor.h" // Sigmodr core widget includes #include @@ -37,6 +38,7 @@ // Qt includes #include +#include #include #include @@ -87,6 +89,10 @@ QWidget* GameUI::Private::makeWidgets(ObjectUI* widget) ui_typechart = form->findChild("varTypechart"); ui_labelTypes = form->findChild("labelTypes"); ui_effectiveness = form->findChild("varEffectiveness"); + QGridLayout* layout = form->findChild("worldMapLayout"); + ui_worldMapEditor = new WorldMapEditor(m_game, widget); + layout->addWidget(ui_worldMapEditor, 0, 0); + widget->setTabOrder(ui_effectiveness, ui_worldMapEditor); connect(ui_title, SIGNAL(textChanged(QString)), this, SLOT(titleChanged(QString))); connect(ui_version, SIGNAL(textChanged(QString)), this, SLOT(versionChanged(QString))); connect(ui_description, SIGNAL(textChanged(QString)), this, SLOT(descriptionChanged(QString))); @@ -116,6 +122,7 @@ void GameUI::Private::resetGui() ui_description->setText(m_game->description()); ui_singlePlayer->setCheckState(m_game->singlePlayer() ? Qt::Checked : Qt::Unchecked); ui_startScript->setValue(m_game->startScript()); + ui_worldMapEditor->setGame(m_game); } void GameUI::Private::titleChanged(const QString& title) -- cgit