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