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