diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-11 16:52:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-11 16:52:27 +0000 |
commit | 669abae48358e131e36fda99043c6bac291e74e7 (patch) | |
tree | 6455f208d421778574675b8c686050d70c98ba8e /src | |
parent | 9c6a5358c0b22b87324280a97eed7d0f3c0bacaa (diff) |
Added support for patrols and platforms.
Diffstat (limited to 'src')
-rw-r--r-- | src/editorwindow.cc | 29 | ||||
-rw-r--r-- | src/sidebar.cc | 9 |
2 files changed, 32 insertions, 6 deletions
diff --git a/src/editorwindow.cc b/src/editorwindow.cc index 88ed470..f08cc2c 100644 --- a/src/editorwindow.cc +++ b/src/editorwindow.cc @@ -72,39 +72,45 @@ bool EditorWindow::loadFile(const QString &filename) if (ini.got_section()) { - //qDebug() << "got section" << ini.section(); - in_subsection = false; - if (ini.got_section("zone")) { editorwindow_zoneproperties.set_comment(ini.comment()); in_entity = false; } else if (ini.got_section("entity")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("jumpgate")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("jumppoint")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("navpoint")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("station")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("star")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("planet")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("racetrack")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("checkpoint")) { in_entity = true; + in_subsection = false; } else if (ini.got_section("cargo")) { in_entity = false; @@ -117,10 +123,27 @@ bool EditorWindow::loadFile(const QString &filename) } else if (ini.got_section("weapon")) { in_entity = false; in_subsection = true; + + } else if (ini.got_section("platform")) { + in_entity = true; + in_subsection = false; + + } else if (ini.got_section("patrol")) { + in_entity = true; + in_subsection = false; + + } else if (ini.got_section("waypoint")) { + in_entity = false; + in_subsection = true; + + } else if (ini.got_section("npc")) { + in_entity = false; + in_subsection = true; } else { entity = 0; in_entity = false; + in_subsection = false; } if (in_entity) { diff --git a/src/sidebar.cc b/src/sidebar.cc index 3093fc1..aced7bd 100644 --- a/src/sidebar.cc +++ b/src/sidebar.cc @@ -47,12 +47,15 @@ SideBar::SideBar(QWidget *parent) : QWidget(parent) // TODO this should probably be read from entities.ini // note that EditorWindow::loadFile should use the same list combo_entitytype->addItem(tr("entity")); - combo_entitytype->addItem(tr("planet")); - combo_entitytype->addItem(tr("station")); - combo_entitytype->addItem(tr("star")); combo_entitytype->addItem(tr("jumpgate")); combo_entitytype->addItem(tr("jumppoint")); combo_entitytype->addItem(tr("navpoint")); + combo_entitytype->addItem(tr("patrol")); + combo_entitytype->addItem(tr("platform")); + combo_entitytype->addItem(tr("planet")); + combo_entitytype->addItem(tr("station")); + combo_entitytype->addItem(tr("star")); + combo_entitytype->setEditable(true); box_entitytype->addWidget(label_entitytype); |