Description:
UI fixes.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r293:e8792e669968 -

@@ -106,7 +106,7
106 public static class DialogInterface
106 public static class DialogInterface
107 {
107 {
108
108
109 public static bool had_focus = false;
109 public static bool hadFocus = false;
110 public static Node<DialogOption> RenderDialog(ref bool show, ref bool paused, ImFontPtr font, Node<DialogOption> currentNode)
110 public static Node<DialogOption> RenderDialog(ref bool show, ref bool paused, ImFontPtr font, Node<DialogOption> currentNode)
111 {
111 {
112 Node<DialogOption> new_child = currentNode;
112 Node<DialogOption> new_child = currentNode;
@@ -119,16 +119,16
119 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
119 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
120
120
121 ImGui.SetNextWindowSize(new Num.Vector2(400, 200));
121 ImGui.SetNextWindowSize(new Num.Vector2(400, 200));
122 if(ContractsWindow.had_focus)
122 if(DialogInterface.hadFocus)
123 {
123 {
124 ImGui.PushStyleColor(ImGuiCol.Text, StyleSet.white);
124 ImGui.PushStyleColor(ImGuiCol.Text, StyleSet.white);
125 }
125 }
126 ImGui.Begin(currentNode.data.speaker, ref show, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoSavedSettings);
126 ImGui.Begin(currentNode.data.speaker, ref show, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoSavedSettings);
127 if (ContractsWindow.had_focus)
127 if (DialogInterface.hadFocus)
128 {
128 {
129 ImGui.PopStyleColor();
129 ImGui.PopStyleColor();
130 }
130 }
131 ContractsWindow.had_focus = ImGui.IsWindowFocused();
131 DialogInterface.hadFocus = ImGui.IsWindowFocused();
132
132
133
133
134 if (currentNode.data.response != null)
134 if (currentNode.data.response != null)
@@ -10,6 +10,7
10
10
11 public static class ForestWindow
11 public static class ForestWindow
12 {
12 {
13 public static bool hadFocus = false;
13 public static void Render(bool show, ImFontPtr font, Simulation sim, ImGuiWindowBridgeEngine engine)
14 public static void Render(bool show, ImFontPtr font, Simulation sim, ImGuiWindowBridgeEngine engine)
14 {
15 {
15 bool newShow = show;
16 bool newShow = show;
@@ -21,7 +22,18
21 StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars);
22 StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars);
22 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
23 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
23
24
25
26 if(ForestWindow.hadFocus)
27 {
28 ImGui.PushStyleColor(ImGuiCol.Text, StyleSet.white);
29 }
30
24 ImGui.Begin("Forest Policy", ref show, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoSavedSettings);
31 ImGui.Begin("Forest Policy", ref show, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoSavedSettings);
32 if (ForestWindow.hadFocus)
33 {
34 ImGui.PopStyleColor();
35 }
36 ForestWindow.hadFocus = ImGui.IsWindowFocused();
25
37
26
38
27 int new_tree_planting = sim.tree_planting;
39 int new_tree_planting = sim.tree_planting;
You need to be logged in to leave comments. Login now