Description:
Refactor Dialog to use StyleSet.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -111,26 +111,13 | |||
|
111 | 111 | if (show) |
|
112 | 112 | { |
|
113 | 113 | ImGui.PushFont(font); |
|
114 | ||
|
115 | 114 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
116 | ImGui.PushStyleVar(ImGuiStyleVar.FrameRounding, 0.0f); | |
|
117 | ImGui.PushStyleVar(ImGuiStyleVar.WindowRounding, 0.0f); | |
|
118 | ImGui.PushStyleVar(ImGuiStyleVar.FrameBorderSize, 1.0f); | |
|
119 | ImGui.PushStyleColor(ImGuiCol.WindowBg, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); | |
|
120 | 115 | |
|
121 | ImGui.PushStyleColor(ImGuiCol.TitleBg, StyleSet.title_bar); | |
|
122 | ImGui.PushStyleColor(ImGuiCol.TitleBgActive, StyleSet.title_bar); | |
|
123 | ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, StyleSet.title_bar); | |
|
124 | ||
|
125 | ImGui.PushStyleColor(ImGuiCol.Border, new Num.Vector4(0f, 0f, 0f, 1f)); | |
|
126 | ImGui.PushStyleColor(ImGuiCol.BorderShadow, new Num.Vector4(0f, 0f, 0f, 0.5f)); | |
|
116 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); | |
|
117 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); | |
|
127 | 118 | |
|
128 | ||
|
129 | ||
|
130 | ImGui.PushStyleColor(ImGuiCol.Button, new Num.Vector4(0.75f, 0.75f, 0.75f, 1f)); | |
|
131 | ImGui.PushStyleColor(ImGuiCol.Text, new Num.Vector4(0f, 0f, 0f, 1f)); | |
|
132 | 119 | ImGui.SetNextWindowSize(new Num.Vector2(400, 200)); |
|
133 | ImGui.Begin(currentNode.data.speaker, ref show); | |
|
120 | ImGui.Begin(currentNode.data.speaker, ref show, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoSavedSettings); | |
|
134 | 121 | |
|
135 | 122 | |
|
136 | 123 | if (currentNode.data.response != null) |
@@ -167,9 +154,9 | |||
|
167 | 154 | |
|
168 | 155 | } |
|
169 | 156 | ImGui.End(); |
|
170 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; | |
|
171 | ImGui.PopStyleVar(3); | |
|
172 | ImGui.PopStyleColor(8); | |
|
157 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; | |
|
158 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); | |
|
159 | StyleSet.popColorSet(StyleSet.defaultWindowColors); | |
|
173 | 160 | ImGui.PopFont(); |
|
174 | 161 | } |
|
175 | 162 | return new_child; |
You need to be logged in to leave comments.
Login now