Description:
Fix some dialog issues.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -124,8 +124,7 | |||||
|
124 | } |
|
124 | } |
|
125 |
|
125 | ||
|
126 | //Update the dialog component with the new speaker, dialog, and options: |
|
126 | //Update the dialog component with the new speaker, dialog, and options: |
|
127 |
|
127 | var continuation = BleepAndFlatten(this.Story.ContinueMaximally(), profanity_setting); | |
|
128 | var continuation = BleepAndFlatten(this.Story.Continue(), profanity_setting); |
|
||
|
129 | var parts = Regex.Split(continuation, ":", 0); |
|
128 | var parts = Regex.Split(continuation, ":", 0); |
|
130 | var speaker = (parts.Length == 2) ? BleepAndFlatten(parts[0], profanity_setting) : "Dialog"; |
|
129 | var speaker = (parts.Length == 2) ? BleepAndFlatten(parts[0], profanity_setting) : "Dialog"; |
|
131 | var dialog = (parts.Length == 2) ? BleepAndFlatten(parts[1], profanity_setting) : continuation; |
|
130 | var dialog = (parts.Length == 2) ? BleepAndFlatten(parts[1], profanity_setting) : continuation; |
@@ -177,7 +176,7 | |||||
|
177 | var Knot = GetComponent<DialogComponent>(lowestEntity).Knot; |
|
176 | var Knot = GetComponent<DialogComponent>(lowestEntity).Knot; |
|
178 |
|
177 | ||
|
179 | Story.ChoosePathString(Knot); |
|
178 | Story.ChoosePathString(Knot); |
|
180 | var continuation = this.Story.Continue(); |
|
179 | var continuation = this.Story.ContinueMaximally(); |
|
181 | var parts = Regex.Split(continuation, ":", 0); |
|
180 | var parts = Regex.Split(continuation, ":", 0); |
|
182 | var speaker = (parts.Length == 2) ? BleepAndFlatten(parts[0], profanity_setting) : "Dialog"; |
|
181 | var speaker = (parts.Length == 2) ? BleepAndFlatten(parts[0], profanity_setting) : "Dialog"; |
|
183 | var dialog = (parts.Length == 2) ? BleepAndFlatten(parts[1], profanity_setting) : continuation; |
|
182 | var dialog = (parts.Length == 2) ? BleepAndFlatten(parts[1], profanity_setting) : continuation; |
@@ -145,7 +145,8 | |||||
|
145 | ImGuiWindowBridgeEngine bridgeEngine, ref bool show, ImFontPtr font, DialogComponent dialogComponent, int imageIndex) |
|
145 | ImGuiWindowBridgeEngine bridgeEngine, ref bool show, ImFontPtr font, DialogComponent dialogComponent, int imageIndex) |
|
146 | { |
|
146 | { |
|
147 | var paused = true; |
|
147 | var paused = true; |
|
148 |
if (show |
|
148 | if (show |
|
|
149 | && !String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)) | ||
|
149 | { |
|
150 | { |
|
150 | ImGui.PushFont(font); |
|
151 | ImGui.PushFont(font); |
|
151 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
|
152 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; |
@@ -183,11 +184,11 | |||||
|
183 |
|
184 | ||
|
184 | ImGui.NextColumn(); |
|
185 | ImGui.NextColumn(); |
|
185 |
|
186 | ||
|
186 |
|
187 | if (!String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)) | |
|
187 | if (dialogComponent.CurrentDialog != null) |
|
||
|
188 | { |
|
188 | { |
|
189 | string messageText = dialogComponent.CurrentDialog; |
|
189 | string messageText = dialogComponent.CurrentDialog; |
|
190 | ImGui.TextWrapped(messageText); |
|
190 | ImGui.TextWrapped(messageText); |
|
|
191 | Logging.Info("Dialog: \"" + messageText + "\""); | ||
|
191 | } |
|
192 | } |
|
192 |
|
193 | ||
|
193 | ImGui.Columns(1); |
|
194 | ImGui.Columns(1); |
@@ -224,17 +225,21 | |||||
|
224 | } |
|
225 | } |
|
225 | } |
|
226 | } |
|
226 |
|
227 | ||
|
227 | if (dialogComponent.CurrentDialog == null) |
|
||
|
228 | { |
|
||
|
229 | show = false; |
|
||
|
230 | paused = false; |
|
||
|
231 |
|
|||
|
232 | } |
|
||
|
233 | ImGui.End(); |
|
228 | ImGui.End(); |
|
234 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
229 | ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; |
|
235 | StyleSets.defaultSet.pop(); |
|
230 | StyleSets.defaultSet.pop(); |
|
236 | ImGui.PopFont(); |
|
231 | ImGui.PopFont(); |
|
237 | } |
|
232 | } |
|
|
233 | if (String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)) | ||
|
|
234 | { | ||
|
|
235 | show = false; | ||
|
|
236 | paused = false; | ||
|
|
237 | bridgeEngine.dialogChoiceMessages.Add(new DialogChoiceMessage | ||
|
|
238 | { | ||
|
|
239 | Entity = entity, | ||
|
|
240 | Choice = -1 | ||
|
|
241 | }); | ||
|
|
242 | } | ||
|
238 | if (!paused) |
|
243 | if (!paused) |
|
239 | { |
|
244 | { |
|
240 | bridgeEngine.gameRateMessages.Add(new GameRateMessage { |
|
245 | bridgeEngine.gameRateMessages.Add(new GameRateMessage { |
You need to be logged in to leave comments.
Login now