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

r488:2f1c0b5b9bbe -

@@ -114,32 +114,32
114 name = string.Format("#logging_company.capitalizeAll# {0}", this.simulation.DateTime.ToShortDateString())
114 name = string.Format("#logging_company.capitalizeAll# {0}", this.simulation.DateTime.ToShortDateString())
115 });
115 });
116
116
117 #region events
117 #region events
118 if (simulation.latestBudget.DateTime != default)
118 if (simulation.latestBudget.DateTime != default)
119 {
119 {
120
120
121 if (simulation.latestBudget.money < 0M
121 if (simulation.latestBudget.money < 0M
122 && simulation.previousBudget.money >= 0M)
122 && simulation.previousBudget.money >= 0M)
123 {
123 {
124 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "EndLowFunds"});
124 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "EndLowFunds"});
125 }
125 }
126 else if (simulation.latestBudget.money < 10_000M
126 else if (simulation.latestBudget.money < 10_000M
127 && simulation.previousBudget.money >= 10_000M)
127 && simulation.previousBudget.money >= 10_000M)
128 {
128 {
129 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "VeryLowFunds"});
129 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "VeryLowFunds"});
130 }
130 }
131 else if (simulation.latestBudget.money < 25_000M
131 else if (simulation.latestBudget.money < 25_000M
132 && simulation.previousBudget.money >= 25_000M)
132 && simulation.previousBudget.money >= 25_000M)
133 {
133 {
134 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "LowFunds"});
134 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "LowFunds"});
135 }
135 }
136 if (simulation.map.tree_count < 400)
136 if (simulation.map.tree_count < 400)
137 {
137 {
138 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "PoorTreeHealth"});
138 SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "PoorTreeHealth"});
139 }
139 }
140 }
140 }
141
141
142 #endregion
142 #endregion
143
143
144 foreach (ref readonly var entity in ReadEntities<TreeDeltaComponent>())
144 foreach (ref readonly var entity in ReadEntities<TreeDeltaComponent>())
145 {
145 {
@@ -248,11 +248,12
248 NewGameWindow.Initialize(this.grammar);
248 NewGameWindow.Initialize(this.grammar);
249
249
250 this.Story = new Story(File.ReadAllText(@"Content/dialog.json"));
250 this.Story = new Story(File.ReadAllText(@"Content/dialog.json"));
251 //Bindings have to
251 //Bindings have to
252 Story.BindExternalFunction ("endGame", () => {
252 Story.BindExternalFunction ("endGame", () => {
253 Logging.Success("endGame");
253 Logging.Success("endGame");
254 this.imGuiWindowBridgeEngine.gameStateMessages.Add(new GameStateMessage {isPlaying = false});
254 this.imGuiWindowBridgeEngine.gameStateMessages.Add(new GameStateMessage {isPlaying = false});
255 this.imGuiWindowBridgeEngine.typeMessages.Add(new ToggleWindowTypeMessage {Window = isometricparkfna.Messages.Window.MainMenu});});
255 this.imGuiWindowBridgeEngine.typeMessages.Add(new ToggleWindowTypeMessage {Window = isometricparkfna.Messages.Window.MainMenu});
256 });
256
257
257 Logging.Debug(this.Story.ContinueMaximally());
258 Logging.Debug(this.Story.ContinueMaximally());
258
259
@@ -201,9 +201,9
201
201
202 public int dead_trees
202 public int dead_trees
203 {
203 {
204 get {
204 get {
205 return this.map.iterate_cells().Where(c => (c.status == CellStatus.DeadTree)).Count();
205 return this.map.iterate_cells().Where(c => (c.status == CellStatus.DeadTree)).Count();
206 }
206 }
207 }
207 }
208
208
209 public float healthy_percent
209 public float healthy_percent
@@ -143,8 +143,8
143
143
144 private static bool ContentRemaining(DialogComponent dialogComponent)
144 private static bool ContentRemaining(DialogComponent dialogComponent)
145 {
145 {
146 return !String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)
146 return !String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)
147 || ((dialogComponent.Options != null) && dialogComponent.Options.Count > 0);
147 || ((dialogComponent.Options != null) && dialogComponent.Options.Count > 0);
148 }
148 }
149
149
150 public static void RenderDialog(Entity entity,
150 public static void RenderDialog(Entity entity,
@@ -157,8 +157,8
157 //I don't know if it's the best design, but it's possible to
157 //I don't know if it's the best design, but it's possible to
158 //get into a state where we're effectively done.but there's still an entity
158 //get into a state where we're effectively done.but there's still an entity
159 if (show && ContentRemaining(dialogComponent)) {
159 if (show && ContentRemaining(dialogComponent)) {
160 ImGui.PushFont(font);
160 ImGui.PushFont(font);
161 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None;
161 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None;
162
162
163 StyleSets.defaultSet.push();
163 StyleSets.defaultSet.push();
164
164
@@ -239,13 +239,13
239 //If we're at the end, advance it and hide.
239 //If we're at the end, advance it and hide.
240 if (!ContentRemaining(dialogComponent))
240 if (!ContentRemaining(dialogComponent))
241 {
241 {
242 show = false;
242 show = false;
243 paused = false;
243 paused = false;
244 bridgeEngine.dialogChoiceMessages.Add(new DialogChoiceMessage
244 bridgeEngine.dialogChoiceMessages.Add(new DialogChoiceMessage
245 {
245 {
246 Entity = entity,
246 Entity = entity,
247 Choice = -1
247 Choice = -1
248 });
248 });
249 }
249 }
250 if (!paused)
250 if (!paused)
251 {
251 {
@@ -8,7 +8,6
8 {
8 {
9 public class StyleSet
9 public class StyleSet
10 {
10 {
11
12 // public static IMFont
11 // public static IMFont
13 public static void pushStyleVarSet(Dictionary<ImGuiStyleVar, float> style_set)
12 public static void pushStyleVarSet(Dictionary<ImGuiStyleVar, float> style_set)
14 {
13 {
@@ -39,8 +38,7
39 public Dictionary<ImGuiCol, Num.Vector4> WindowColors {get;}
38 public Dictionary<ImGuiCol, Num.Vector4> WindowColors {get;}
40
39
41 public StyleSet(Dictionary<ImGuiStyleVar, float> windowVars,
40 public StyleSet(Dictionary<ImGuiStyleVar, float> windowVars,
42 Dictionary<ImGuiCol, Num.Vector4> windowColors
41 Dictionary<ImGuiCol, Num.Vector4> windowColors)
43 )
44 {
42 {
45
43
46 this.WindowVars = windowVars;
44 this.WindowVars = windowVars;
@@ -58,8 +56,5
58 StyleSet.popColorSet(this.WindowColors);
56 StyleSet.popColorSet(this.WindowColors);
59 StyleSet.popStyleVarSet(this.WindowVars);
57 StyleSet.popStyleVarSet(this.WindowVars);
60 }
58 }
61
62
63 }
59 }
64
65 }
60 }
@@ -61,38 +61,38
61 {ImGuiCol.Text, black}
61 {ImGuiCol.Text, black}
62 };
62 };
63
63
64 public static Dictionary<ImGuiCol, Num.Vector4> defaultWindowColorsLight = new Dictionary<ImGuiCol, Num.Vector4> {
64 public static Dictionary<ImGuiCol, Num.Vector4> defaultWindowColorsLight = new Dictionary<ImGuiCol, Num.Vector4> {
65 {ImGuiCol.WindowBg, lightgrey},
65 {ImGuiCol.WindowBg, lightgrey},
66 {ImGuiCol.FrameBg, lightgrey},
66 {ImGuiCol.FrameBg, lightgrey},
67 {ImGuiCol.FrameBgHovered, lightgrey},
67 {ImGuiCol.FrameBgHovered, lightgrey},
68 {ImGuiCol.Header, darkgrey},
68 {ImGuiCol.Header, darkgrey},
69 {ImGuiCol.HeaderHovered, darkgrey},
69 {ImGuiCol.HeaderHovered, darkgrey},
70 {ImGuiCol.HeaderActive, darkgrey},
70 {ImGuiCol.HeaderActive, darkgrey},
71 {ImGuiCol.ButtonHovered, lightgrey},
71 {ImGuiCol.ButtonHovered, lightgrey},
72 {ImGuiCol.ButtonActive, darkgrey},
72 {ImGuiCol.ButtonActive, darkgrey},
73 {ImGuiCol.SliderGrab, darkgrey},
73 {ImGuiCol.SliderGrab, darkgrey},
74 {ImGuiCol.SliderGrabActive, darkgrey},
74 {ImGuiCol.SliderGrabActive, darkgrey},
75
75
76
76
77 {ImGuiCol.Tab, darkgrey},
77 {ImGuiCol.Tab, darkgrey},
78 {ImGuiCol.TabHovered, darkgrey},
78 {ImGuiCol.TabHovered, darkgrey},
79 {ImGuiCol.TabActive, selected},
79 {ImGuiCol.TabActive, selected},
80
80
81 {ImGuiCol.CheckMark, black},
81 {ImGuiCol.CheckMark, black},
82
82
83 {ImGuiCol.TitleBg, title_bar},
83 {ImGuiCol.TitleBg, title_bar},
84 {ImGuiCol.TitleBgActive, selected},
84 {ImGuiCol.TitleBgActive, selected},
85 {ImGuiCol.TitleBgCollapsed, title_bar},
85 {ImGuiCol.TitleBgCollapsed, title_bar},
86
86
87 {ImGuiCol.Border, black},
87 {ImGuiCol.Border, black},
88 {ImGuiCol.BorderShadow, black},
88 {ImGuiCol.BorderShadow, black},
89
89
90 {ImGuiCol.PopupBg, white},
90 {ImGuiCol.PopupBg, white},
91
91
92 {ImGuiCol.Button, grey_transparent},
92 {ImGuiCol.Button, grey_transparent},
93 {ImGuiCol.Text, black}
93 {ImGuiCol.Text, black}
94 };
94 };
95 public static StyleSet defaultSet = new StyleSet(defaultWindowVars, defaultWindowColors);
95 public static StyleSet defaultSet = new StyleSet(defaultWindowVars, defaultWindowColors);
96 }
96 }
97
97
98 }
98 }
You need to be logged in to leave comments. Login now