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)

This commit is contained in:
Malkierian 2025-04-04 08:00:05 -07:00 committed by GitHub
parent 38574bbb9e
commit cb7d9279e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -849,9 +849,19 @@ void DrawFlagsTab() {
DrawGroupWithBorder( DrawGroupWithBorder(
[&]() { [&]() {
size_t selectedGsMap = 0; PushStyleCombobox(THEME_COLOR);
static size_t selectedGsMap = 0;
ImGui::Text("Gold Skulltulas"); 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 // TODO We should write out descriptions for each one... ugh
ImGui::AlignTextToFramePadding(); ImGui::AlignTextToFramePadding();