# HG changeset patch # User Alys Brooks # Date 2022-01-12 04:59:58 # Node ID fb04f8102385f07a0c645c15180e563517928432 # Parent b5a6c8056a4a5bdbbfb5ef81df79e83bc35f6c5b Fix bug in Options window. Options window was crashing, possibly due to an ImGui upgrade. diff --git a/isometric-park-fna/UI/Graph.cs b/isometric-park-fna/UI/Graph.cs --- a/isometric-park-fna/UI/Graph.cs +++ b/isometric-park-fna/UI/Graph.cs @@ -129,6 +129,23 @@ ImGui.SameLine(); ImGui.RadioButton("100 years", ref GraphWindow.year, 100); + ImGui.Text("Trees:"); + for (int i = 0; i < tree_series.Length; i++) + { + var key = tree_series[i]; + if (Menu.activeButton(key, data_sets_show[key], StyleSets.selected, StyleSets.white)) + { + data_sets_show[key] = !data_sets_show[key]; + } + + if (i != tree_series.Length-1) + { + ImGui.SameLine(); + } + + } + + ImGui.Text("Money:"); for (int i = 0; i < money_series.Length; i++) { var key = money_series[i]; @@ -141,15 +158,6 @@ } } - foreach (var key in tree_series) - { - if (Menu.activeButton(key, data_sets_show[key], StyleSets.selected, StyleSets.white)) - { - data_sets_show[key] = !data_sets_show[key]; - } - ImGui.SameLine(); - - } diff --git a/isometric-park-fna/UI/OptionsWindow.cs b/isometric-park-fna/UI/OptionsWindow.cs --- a/isometric-park-fna/UI/OptionsWindow.cs +++ b/isometric-park-fna/UI/OptionsWindow.cs @@ -62,7 +62,7 @@ ImGui.SameLine(); - if (ImGui.BeginCombo("", string.Format("{0}x{1}", + if (ImGui.BeginCombo("##resolutions", string.Format("{0}x{1}", newResolution.X, newResolution.Y))) {