summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-01-26 00:53:01 +0100
committerAki <please@ignore.pl>2023-01-26 00:53:01 +0100
commitab7c2e78ef2dbf29f6713ac975d2c071f101b813 (patch)
treed7afac825c31762488f94f81e06707fe66a1b08f
parent624656875f9bc4c36ef2cc53948a158709487c20 (diff)
downloadkurator-ab7c2e78ef2dbf29f6713ac975d2c071f101b813.zip
kurator-ab7c2e78ef2dbf29f6713ac975d2c071f101b813.tar.gz
kurator-ab7c2e78ef2dbf29f6713ac975d2c071f101b813.tar.bz2
Moved the ship type combo outside of the layout editor popup
-rw-r--r--kurator/src/ScenarioEditor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/kurator/src/ScenarioEditor.cpp b/kurator/src/ScenarioEditor.cpp
index b657230..ee73839 100644
--- a/kurator/src/ScenarioEditor.cpp
+++ b/kurator/src/ScenarioEditor.cpp
@@ -106,6 +106,10 @@ groups_editor(std::shared_ptr<universe::Repository> repo, std::vector<Group>& gr
const bool removed = ImGui::Button("-");
changed |= removed;
ImGui::SameLine();
+ ImGui::PushItemWidth(140.0f);
+ changed |= ship_type_combo("##Ship Type", repo, it->loadout.type);
+ ImGui::PopItemWidth();
+ ImGui::SameLine();
if (ImGui::Button("Edit"))
ImGui::OpenPopup("Layout Editor");
if (ImGui::BeginPopup("Layout Editor")) {
@@ -136,8 +140,7 @@ groups_editor(std::shared_ptr<universe::Repository> repo, std::vector<Group>& gr
bool
loadout_editor(std::shared_ptr<universe::Repository> repo, campaign::Loadout& loadout)
{
- bool changed = ship_type_combo("Ship Type", repo, loadout.type);
- ImGui::Indent();
+ bool changed = false;
auto it = loadout.turrets.begin();
while (it != loadout.turrets.end()) {
ImGui::PushID(it - loadout.turrets.begin());