From fa42d04ab3738bccb6a723ec94949b64fcbb7f32 Mon Sep 17 00:00:00 2001 From: Webster Sheets Date: Fri, 1 Mar 2024 18:19:38 -0500 Subject: [PATCH] System Editor: show disabled body economic properties - These properties are currently overwritten when loading custom systems - Display a disabled edit field with a TODO notice until that changes --- src/editor/system/GalaxyEditAPI.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/editor/system/GalaxyEditAPI.cpp b/src/editor/system/GalaxyEditAPI.cpp index a89571b286a..837904becfd 100644 --- a/src/editor/system/GalaxyEditAPI.cpp +++ b/src/editor/system/GalaxyEditAPI.cpp @@ -548,11 +548,16 @@ void SystemBody::EditorAPI::EditOrbitalParameters(SystemBody *body, UndoSystem * void SystemBody::EditorAPI::EditEconomicProperties(SystemBody *body, UndoSystem *undo) { + ImGui::SeparatorText("Economic Parameters"); + // TODO: system generation currently ignores these fields of a system body // and overwrites them with randomly-rolled values. - return; + ImGui::BeginDisabled(); - ImGui::SeparatorText("Economic Parameters"); + ImGui::PushTextWrapPos(ImGui::GetContentRegionAvail().x); + ImGui::TextColored(ImVec4(0.8, 0.8, 0.8, 1.0), "These fields are currently overwritten when the system is loaded."); + ImGui::PopTextWrapPos(); + ImGui::Spacing(); ImGui::InputFixed("Population", &body->m_population); if (Draw::UndoHelper("Edit Population", undo)) @@ -561,6 +566,8 @@ void SystemBody::EditorAPI::EditEconomicProperties(SystemBody *body, UndoSystem ImGui::InputFixed("Agricultural Activity", &body->m_agricultural); if (Draw::UndoHelper("Edit Agricultural Activity", undo)) AddUndoSingleValue(undo, &body->m_agricultural); + + ImGui::EndDisabled(); } void SystemBody::EditorAPI::EditStarportProperties(SystemBody *body, UndoSystem *undo)