Description:
Fix style.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -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 |
|
|
118 | if (simulation.latestBudget.DateTime != default) |
|
119 | { |
|
119 | { |
|
120 |
|
120 | ||
|
121 |
|
|
121 | if (simulation.latestBudget.money < 0M |
|
122 |
|
|
122 | && simulation.previousBudget.money >= 0M) |
|
123 | { |
|
123 | { |
|
124 |
|
|
124 | SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "EndLowFunds"}); |
|
125 | } |
|
125 | } |
|
126 |
|
|
126 | else if (simulation.latestBudget.money < 10_000M |
|
127 |
|
|
127 | && simulation.previousBudget.money >= 10_000M) |
|
128 | { |
|
128 | { |
|
129 |
|
|
129 | SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "VeryLowFunds"}); |
|
130 | } |
|
130 | } |
|
131 |
|
|
131 | else if (simulation.latestBudget.money < 25_000M |
|
132 |
|
|
132 | && simulation.previousBudget.money >= 25_000M) |
|
133 | { |
|
133 | { |
|
134 |
|
|
134 | SendMessage<SpawnDialogMessage>(new SpawnDialogMessage {Path = "LowFunds"}); |
|
135 | } |
|
135 | } |
|
136 |
|
|
136 | if (simulation.map.tree_count < 400) |
|
137 | { |
|
137 | { |
|
138 |
|
|
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 |
|
|
253 | Logging.Success("endGame"); |
|
254 |
|
|
254 | this.imGuiWindowBridgeEngine.gameStateMessages.Add(new GameStateMessage {isPlaying = false}); |
|
255 |
|
|
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 |
|
|
204 | get { |
|
205 |
|
|
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 |
|
|
146 | return !String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog) |
|
147 |
|
|
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 |
|
|
160 | ImGui.PushFont(font); |
|
161 |
|
|
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 |
|
|
242 | show = false; |
|
243 |
|
|
243 | paused = false; |
|
244 |
|
|
244 | bridgeEngine.dialogChoiceMessages.Add(new DialogChoiceMessage |
|
245 |
|
|
245 | { |
|
246 |
|
|
246 | Entity = entity, |
|
247 |
|
|
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 |
|
|
64 | public static Dictionary<ImGuiCol, Num.Vector4> defaultWindowColorsLight = new Dictionary<ImGuiCol, Num.Vector4> { |
|
65 |
|
|
65 | {ImGuiCol.WindowBg, lightgrey}, |
|
66 |
|
|
66 | {ImGuiCol.FrameBg, lightgrey}, |
|
67 |
|
|
67 | {ImGuiCol.FrameBgHovered, lightgrey}, |
|
68 |
|
|
68 | {ImGuiCol.Header, darkgrey}, |
|
69 |
|
|
69 | {ImGuiCol.HeaderHovered, darkgrey}, |
|
70 |
|
|
70 | {ImGuiCol.HeaderActive, darkgrey}, |
|
71 |
|
|
71 | {ImGuiCol.ButtonHovered, lightgrey}, |
|
72 |
|
|
72 | {ImGuiCol.ButtonActive, darkgrey}, |
|
73 |
|
|
73 | {ImGuiCol.SliderGrab, darkgrey}, |
|
74 |
|
|
74 | {ImGuiCol.SliderGrabActive, darkgrey}, |
|
75 |
|
75 | ||
|
76 |
|
76 | ||
|
77 |
|
|
77 | {ImGuiCol.Tab, darkgrey}, |
|
78 |
|
|
78 | {ImGuiCol.TabHovered, darkgrey}, |
|
79 |
|
|
79 | {ImGuiCol.TabActive, selected}, |
|
80 |
|
80 | ||
|
81 |
|
|
81 | {ImGuiCol.CheckMark, black}, |
|
82 |
|
82 | ||
|
83 |
|
|
83 | {ImGuiCol.TitleBg, title_bar}, |
|
84 |
|
|
84 | {ImGuiCol.TitleBgActive, selected}, |
|
85 |
|
|
85 | {ImGuiCol.TitleBgCollapsed, title_bar}, |
|
86 |
|
86 | ||
|
87 |
|
|
87 | {ImGuiCol.Border, black}, |
|
88 |
|
|
88 | {ImGuiCol.BorderShadow, black}, |
|
89 |
|
89 | ||
|
90 |
|
|
90 | {ImGuiCol.PopupBg, white}, |
|
91 |
|
91 | ||
|
92 |
|
|
92 | {ImGuiCol.Button, grey_transparent}, |
|
93 |
|
|
93 | {ImGuiCol.Text, black} |
|
94 | }; |
|
94 | }; |
|
95 |
|
|
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