Description:
Update to use new StyleSet code.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -44,8 +44,7 | |||||
|
44 | ImGui.PushFont(font); |
|
44 | ImGui.PushFont(font); |
|
45 |
|
45 | ||
|
46 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
46 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
47 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
47 | StyleSets.defaultSet.push(); |
|
48 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
49 | ImGui.SetNextWindowSize(new Num.Vector2(320, 420)); |
|
48 | ImGui.SetNextWindowSize(new Num.Vector2(320, 420)); |
|
50 |
|
49 | ||
|
51 | var title = string.Format("Contract {0} ## {1}", name, entity.ID); |
|
50 | var title = string.Format("Contract {0} ## {1}", name, entity.ID); |
@@ -164,8 +163,7 | |||||
|
164 |
|
163 | ||
|
165 | ImGui.End(); |
|
164 | ImGui.End(); |
|
166 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
165 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
167 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
166 | StyleSets.defaultSet.pop(); |
|
168 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
169 | ImGui.PopFont(); |
|
167 | ImGui.PopFont(); |
|
170 |
|
168 | ||
|
171 | // Logging.Trace("Finished."); |
|
169 | // Logging.Trace("Finished."); |
@@ -34,8 +34,7 | |||||
|
34 | ImGui.PushFont(font); |
|
34 | ImGui.PushFont(font); |
|
35 |
|
35 | ||
|
36 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
36 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
37 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
37 | StyleSets.defaultSet.push(); |
|
38 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
39 |
|
38 | ||
|
40 | ImGui.SetNextWindowSize(new Num.Vector2(320, 340)); |
|
39 | ImGui.SetNextWindowSize(new Num.Vector2(320, 340)); |
|
41 | if(ContractsWindow.had_focus) |
|
40 | if(ContractsWindow.had_focus) |
@@ -150,8 +149,7 | |||||
|
150 |
|
149 | ||
|
151 | ImGui.End(); |
|
150 | ImGui.End(); |
|
152 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
151 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
153 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
152 | StyleSets.defaultSet.pop(); |
|
154 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
155 | ImGui.PopFont(); |
|
153 | ImGui.PopFont(); |
|
156 | } |
|
154 | } |
|
157 |
|
155 |
@@ -115,8 +115,7 | |||||
|
115 | ImGui.PushFont(font); |
|
115 | ImGui.PushFont(font); |
|
116 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
116 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
117 |
|
117 | ||
|
118 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
118 | StyleSets.defaultSet.push(); |
|
119 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
120 |
|
119 | ||
|
121 | ImGui.SetNextWindowSize(new Num.Vector2(400, 200)); |
|
120 | ImGui.SetNextWindowSize(new Num.Vector2(400, 200)); |
|
122 | if(DialogInterface.hadFocus) |
|
121 | if(DialogInterface.hadFocus) |
@@ -166,8 +165,7 | |||||
|
166 | } |
|
165 | } |
|
167 | ImGui.End(); |
|
166 | ImGui.End(); |
|
168 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
167 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
169 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
168 | StyleSets.defaultSet.pop(); |
|
170 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
171 | ImGui.PopFont(); |
|
169 | ImGui.PopFont(); |
|
172 | } |
|
170 | } |
|
173 | return new_child; |
|
171 | return new_child; |
@@ -19,8 +19,7 | |||||
|
19 | ImGui.PushFont(font); |
|
19 | ImGui.PushFont(font); |
|
20 |
|
20 | ||
|
21 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
21 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
22 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
22 | StyleSets.defaultSet.push(); |
|
23 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
24 |
|
23 | ||
|
25 |
|
24 | ||
|
26 | if(ForestWindow.hadFocus) |
|
25 | if(ForestWindow.hadFocus) |
@@ -56,11 +55,8 | |||||
|
56 |
|
55 | ||
|
57 | ImGui.End(); |
|
56 | ImGui.End(); |
|
58 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
57 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
59 | // ImGui.PopStyleVar(3); |
|
58 | StyleSets.defaultSet.pop(); |
|
60 |
|
|
59 | ImGui.PopFont(); |
|
61 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
||
|
62 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
63 | ImGui.PopFont(); |
|
||
|
64 | } |
|
60 | } |
|
65 | if (show != newShow) |
|
61 | if (show != newShow) |
|
66 | { |
|
62 | { |
@@ -27,8 +27,7 | |||||
|
27 | Num.Vector2 text_size = ImGui.CalcTextSize("Quit to Main Menu"); |
|
27 | Num.Vector2 text_size = ImGui.CalcTextSize("Quit to Main Menu"); |
|
28 | Num.Vector2 button_size = new Num.Vector2((int)text_size.X*1.1f, |
|
28 | Num.Vector2 button_size = new Num.Vector2((int)text_size.X*1.1f, |
|
29 | (int)text_size.Y*1.25f+5); |
|
29 | (int)text_size.Y*1.25f+5); |
|
30 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
30 | StyleSets.defaultSet.push(); |
|
31 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
32 |
|
31 | ||
|
33 |
|
32 | ||
|
34 | ImGui.SetNextWindowPos(new Num.Vector2(width/2, 200)); |
|
33 | ImGui.SetNextWindowPos(new Num.Vector2(width/2, 200)); |
@@ -62,8 +61,7 | |||||
|
62 |
|
61 | ||
|
63 |
|
62 | ||
|
64 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
63 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
65 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
64 | StyleSets.defaultSet.pop(); |
|
66 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
67 | ImGui.PopFont(); |
|
65 | ImGui.PopFont(); |
|
68 | } |
|
66 | } |
|
69 | } |
|
67 | } |
@@ -28,8 +28,8 | |||||
|
28 | Num.Vector2 button_size = new Num.Vector2((int)text_size.X*1.1f, |
|
28 | Num.Vector2 button_size = new Num.Vector2((int)text_size.X*1.1f, |
|
29 | (int)text_size.Y*1.25f+5); |
|
29 | (int)text_size.Y*1.25f+5); |
|
30 |
|
30 | ||
|
31 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
31 | |
|
32 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
32 | StyleSets.defaultSet.push(); |
|
33 |
|
33 | ||
|
34 | ImGui.Begin("##Toolbar", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar); |
|
34 | ImGui.Begin("##Toolbar", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar); |
|
35 |
|
35 | ||
@@ -46,10 +46,8 | |||||
|
46 |
|
46 | ||
|
47 | ImGui.End(); |
|
47 | ImGui.End(); |
|
48 |
|
48 | ||
|
49 |
|
|||
|
50 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
49 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
51 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
50 | StyleSets.defaultSet.pop(); |
|
52 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
53 | ImGui.PopFont(); |
|
51 | ImGui.PopFont(); |
|
54 | } |
|
52 | } |
|
55 | } |
|
53 | } |
@@ -36,8 +36,7 | |||||
|
36 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
36 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
37 |
|
37 | ||
|
38 |
|
38 | ||
|
39 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
39 | StyleSets.defaultSet.push(); |
|
40 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
41 | ImGui.PushStyleColor(ImGuiCol.MenuBarBg, StyleSet.grey); |
|
40 | ImGui.PushStyleColor(ImGuiCol.MenuBarBg, StyleSet.grey); |
|
42 |
|
41 | ||
|
43 | if (ImGui.BeginMainMenuBar()) |
|
42 | if (ImGui.BeginMainMenuBar()) |
@@ -106,11 +105,9 | |||||
|
106 |
|
105 | ||
|
107 | ImGui.EndMainMenuBar(); |
|
106 | ImGui.EndMainMenuBar(); |
|
108 |
|
107 | ||
|
109 | // ImGui.End(); |
|
||
|
110 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
108 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
111 |
|
109 | ||
|
112 |
StyleSet. |
|
110 | StyleSets.defaultSet.pop(); |
|
113 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
114 | ImGui.PopStyleColor(1); |
|
111 | ImGui.PopStyleColor(1); |
|
115 | ImGui.PopFont(); |
|
112 | ImGui.PopFont(); |
|
116 | } |
|
113 | } |
@@ -71,9 +71,7 | |||||
|
71 |
|
71 | ||
|
72 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
72 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
73 |
|
73 | ||
|
74 | StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars); |
|
74 | StyleSets.defaultSet.push(); |
|
75 | StyleSet.pushColorSet(StyleSet.defaultWindowColors); |
|
||
|
76 |
|
|||
|
77 |
|
75 | ||
|
78 | ImGui.SetNextWindowSize(new Num.Vector2(400, 400)); |
|
76 | ImGui.SetNextWindowSize(new Num.Vector2(400, 400)); |
|
79 |
|
77 | ||
@@ -135,10 +133,10 | |||||
|
135 | } |
|
133 | } |
|
136 |
|
134 | ||
|
137 | ImGui.End(); |
|
135 | ImGui.End(); |
|
|
136 | |||
|
138 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
137 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
139 |
|
138 | StyleSets.defaultSet.pop(); | |
|
140 | StyleSet.popStyleVarSet(StyleSet.defaultWindowVars); |
|
139 | |
|
141 | StyleSet.popColorSet(StyleSet.defaultWindowColors); |
|
||
|
142 | ImGui.PopFont(); |
|
140 | ImGui.PopFont(); |
|
143 | } |
|
141 | } |
|
144 |
|
142 |
@@ -89,20 +89,20 | |||||
|
89 | ) |
|
89 | ) |
|
90 | { |
|
90 | { |
|
91 |
|
91 | ||
|
92 |
this. |
|
92 | this.WindowVars = windowVars; |
|
93 |
this. |
|
93 | this.WindowColors = windowColors; |
|
94 | } |
|
94 | } |
|
95 |
|
95 | ||
|
96 | public void push() |
|
96 | public void push() |
|
97 | { |
|
97 | { |
|
98 |
StyleSet.pushColorSet(this. |
|
98 | StyleSet.pushColorSet(this.WindowColors); |
|
99 |
StyleSet.pushStyleVarSet(this. |
|
99 | StyleSet.pushStyleVarSet(this.WindowVars); |
|
100 | } |
|
100 | } |
|
101 |
|
101 | ||
|
102 | public void pop() |
|
102 | public void pop() |
|
103 | { |
|
103 | { |
|
104 |
StyleSet.popColorSet(this. |
|
104 | StyleSet.popColorSet(this.WindowColors); |
|
105 |
StyleSet.popStyleVarSet(this. |
|
105 | StyleSet.popStyleVarSet(this.WindowVars); |
|
106 | } |
|
106 | } |
|
107 |
|
107 | ||
|
108 |
|
108 |
You need to be logged in to leave comments.
Login now