Description:
Add cancel button.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -46,8 +46,6 | |||||
|
46 | showModal = true; |
|
46 | showModal = true; |
|
47 |
|
47 | ||
|
48 | NewGameWindow.Reset(); |
|
48 | NewGameWindow.Reset(); |
|
49 |
|
|||
|
50 |
|
|||
|
51 | } |
|
49 | } |
|
52 |
|
50 | ||
|
53 | public static void Reset() { |
|
51 | public static void Reset() { |
@@ -197,7 +195,6 | |||||
|
197 | ImGui.RadioButton("Medium: Austerity", ref choice, ((int)DifficultyLevel.Medium)); |
|
195 | ImGui.RadioButton("Medium: Austerity", ref choice, ((int)DifficultyLevel.Medium)); |
|
198 | ImGui.RadioButton("Hard: Libertarianism", ref choice, ((int)DifficultyLevel.Hard)); |
|
196 | ImGui.RadioButton("Hard: Libertarianism", ref choice, ((int)DifficultyLevel.Hard)); |
|
199 |
|
197 | ||
|
200 |
|
|||
|
201 | if (ImGui.Button("Okay")) |
|
198 | if (ImGui.Button("Okay")) |
|
202 | { |
|
199 | { |
|
203 |
|
200 | ||
@@ -220,13 +217,10 | |||||
|
220 | NewGameWindow.Reset(); |
|
217 | NewGameWindow.Reset(); |
|
221 | } |
|
218 | } |
|
222 |
|
219 | ||
|
223 |
|
|||
|
224 | ImGui.End(); |
|
220 | ImGui.End(); |
|
225 |
|
221 | ||
|
226 |
|
|||
|
227 | StyleSets.defaultSet.pop(); |
|
222 | StyleSets.defaultSet.pop(); |
|
228 | ImGui.PopFont(); |
|
223 | ImGui.PopFont(); |
|
229 |
|
|||
|
230 | } |
|
224 | } |
|
231 | } |
|
225 | } |
|
232 | } |
|
226 | } |
@@ -16,6 +16,7 | |||||
|
16 | { |
|
16 | { |
|
17 |
|
17 | ||
|
18 | public static bool hadFocus = false; |
|
18 | public static bool hadFocus = false; |
|
|
19 | |||
|
19 | public static bool newFullscreen; |
|
20 | public static bool newFullscreen; |
|
20 | public static Vector2 newResolution; |
|
21 | public static Vector2 newResolution; |
|
21 |
|
22 | ||
@@ -23,6 +24,14 | |||||
|
23 | private static int fontSize = 15; |
|
24 | private static int fontSize = 15; |
|
24 | private static ProfanityLevel profanityLevel = default; |
|
25 | private static ProfanityLevel profanityLevel = default; |
|
25 |
|
26 | ||
|
|
27 | |||
|
|
28 | private static bool origFullscreen = OptionsWindow.newFullscreen; | ||
|
|
29 | private static Vector2 origResolution = OptionsWindow.newResolution; | ||
|
|
30 | |||
|
|
31 | private static string origFontName = OptionsWindow.fontName; | ||
|
|
32 | private static int origFontSize = OptionsWindow.fontSize; | ||
|
|
33 | private static ProfanityLevel origProfanityLevel = OptionsWindow.profanityLevel; | ||
|
|
34 | |||
|
26 | public static void Initialize(Vector2 resolution, bool fullscreen, ProfanityLevel profanityLevel) |
|
35 | public static void Initialize(Vector2 resolution, bool fullscreen, ProfanityLevel profanityLevel) |
|
27 | { |
|
36 | { |
|
28 |
|
37 | ||
@@ -165,6 +174,13 | |||||
|
165 | fontName = OptionsWindow.fontName |
|
174 | fontName = OptionsWindow.fontName |
|
166 | }); |
|
175 | }); |
|
167 |
|
176 | ||
|
|
177 | origFullscreen = OptionsWindow.newFullscreen; | ||
|
|
178 | origResolution = OptionsWindow.newResolution; | ||
|
|
179 | |||
|
|
180 | origFontName = OptionsWindow.fontName; | ||
|
|
181 | origFontSize = OptionsWindow.fontSize; | ||
|
|
182 | origProfanityLevel = OptionsWindow.profanityLevel; | ||
|
|
183 | |||
|
168 | } |
|
184 | } |
|
169 | ImGui.SameLine(); |
|
185 | ImGui.SameLine(); |
|
170 | if (ImGui.Button("Apply")) |
|
186 | if (ImGui.Button("Apply")) |
@@ -177,8 +193,28 | |||||
|
177 | fontSize = OptionsWindow.fontSize, |
|
193 | fontSize = OptionsWindow.fontSize, |
|
178 | fontName = OptionsWindow.fontName |
|
194 | fontName = OptionsWindow.fontName |
|
179 | }); |
|
195 | }); |
|
|
196 | |||
|
|
197 | origFullscreen = OptionsWindow.newFullscreen; | ||
|
|
198 | origResolution = OptionsWindow.newResolution; | ||
|
|
199 | |||
|
|
200 | origFontName = OptionsWindow.fontName; | ||
|
|
201 | origFontSize = OptionsWindow.fontSize; | ||
|
|
202 | origProfanityLevel = OptionsWindow.profanityLevel; | ||
|
|
203 | |||
|
180 | } |
|
204 | } |
|
181 |
|
205 | ||
|
|
206 | ImGui.SameLine(); | ||
|
|
207 | if (ImGui.Button("Cancel")) { | ||
|
|
208 | bridgeEngine.typeMessages.Add(new ToggleWindowTypeMessage {Window = Window.Options}); | ||
|
|
209 | |||
|
|
210 | OptionsWindow.newFullscreen = origFullscreen; | ||
|
|
211 | OptionsWindow.newResolution = origResolution; | ||
|
|
212 | |||
|
|
213 | OptionsWindow.fontName = origFontName; | ||
|
|
214 | OptionsWindow.fontSize = origFontSize; | ||
|
|
215 | OptionsWindow.profanityLevel = origProfanityLevel; | ||
|
|
216 | } | ||
|
|
217 | |||
|
182 |
|
218 | ||
|
183 | ImGui.End(); |
|
219 | ImGui.End(); |
|
184 |
|
220 |
You need to be logged in to leave comments.
Login now