From cb7d9279e40781000b676578aad63ca7efee93be Mon Sep 17 00:00:00 2001 From: Malkierian Date: Fri, 4 Apr 2025 08:00:05 -0700 Subject: [PATCH] Fix the GS Map combobox in the Flags tab of the save editor not remembering the selected index, and also rework it to remove the label. (#5317) --- soh/soh/Enhancements/debugger/debugSaveEditor.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index 534201f8e..a97a41d16 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -849,9 +849,19 @@ void DrawFlagsTab() { DrawGroupWithBorder( [&]() { - size_t selectedGsMap = 0; + PushStyleCombobox(THEME_COLOR); + static size_t selectedGsMap = 0; ImGui::Text("Gold Skulltulas"); - Combobox("Map##Gold Skulltulas", &selectedGsMap, gsMapping, comboboxOptionsBase.Tooltip("")); + if (ImGui::BeginCombo("##GSMap", gsMapping[selectedGsMap])) { + for (size_t index = 0; index < gsMapping.size(); index++) { + if (ImGui::Selectable(gsMapping[index])) { + selectedGsMap = index; + } + } + + ImGui::EndCombo(); + } + PopStyleCombobox(); // TODO We should write out descriptions for each one... ugh ImGui::AlignTextToFramePadding();