mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 21:27:58 +03:00
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:
parent
38574bbb9e
commit
cb7d9279e4
1 changed files with 12 additions and 2 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue