From ab7c2e78ef2dbf29f6713ac975d2c071f101b813 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 26 Jan 2023 00:53:01 +0100 Subject: Moved the ship type combo outside of the layout editor popup --- kurator/src/ScenarioEditor.cpp | 7 +++++-- 1 file 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 repo, std::vector& 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 repo, std::vector& gr bool loadout_editor(std::shared_ptr 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()); -- cgit v1.1