diff --git a/isometric-park-fna/Engines/DialogEngine.cs b/isometric-park-fna/Engines/DialogEngine.cs --- a/isometric-park-fna/Engines/DialogEngine.cs +++ b/isometric-park-fna/Engines/DialogEngine.cs @@ -124,8 +124,7 @@ } //Update the dialog component with the new speaker, dialog, and options: - - var continuation = BleepAndFlatten(this.Story.Continue(), profanity_setting); + var continuation = BleepAndFlatten(this.Story.ContinueMaximally(), profanity_setting); var parts = Regex.Split(continuation, ":", 0); var speaker = (parts.Length == 2) ? BleepAndFlatten(parts[0], profanity_setting) : "Dialog"; var dialog = (parts.Length == 2) ? BleepAndFlatten(parts[1], profanity_setting) : continuation; @@ -177,7 +176,7 @@ var Knot = GetComponent(lowestEntity).Knot; Story.ChoosePathString(Knot); - var continuation = this.Story.Continue(); + var continuation = this.Story.ContinueMaximally(); var parts = Regex.Split(continuation, ":", 0); var speaker = (parts.Length == 2) ? BleepAndFlatten(parts[0], profanity_setting) : "Dialog"; var dialog = (parts.Length == 2) ? BleepAndFlatten(parts[1], profanity_setting) : continuation; diff --git a/isometric-park-fna/UI/Dialog.cs b/isometric-park-fna/UI/Dialog.cs --- a/isometric-park-fna/UI/Dialog.cs +++ b/isometric-park-fna/UI/Dialog.cs @@ -145,7 +145,8 @@ ImGuiWindowBridgeEngine bridgeEngine, ref bool show, ImFontPtr font, DialogComponent dialogComponent, int imageIndex) { var paused = true; - if (show) + if (show + && !String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)) { ImGui.PushFont(font); ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None; @@ -183,11 +184,11 @@ ImGui.NextColumn(); - - if (dialogComponent.CurrentDialog != null) + if (!String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)) { string messageText = dialogComponent.CurrentDialog; ImGui.TextWrapped(messageText); + Logging.Info("Dialog: \"" + messageText + "\""); } ImGui.Columns(1); @@ -224,17 +225,21 @@ } } - if (dialogComponent.CurrentDialog == null) - { - show = false; - paused = false; - - } ImGui.End(); ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left; StyleSets.defaultSet.pop(); ImGui.PopFont(); } + if (String.IsNullOrWhiteSpace(dialogComponent.CurrentDialog)) + { + show = false; + paused = false; + bridgeEngine.dialogChoiceMessages.Add(new DialogChoiceMessage + { + Entity = entity, + Choice = -1 + }); + } if (!paused) { bridgeEngine.gameRateMessages.Add(new GameRateMessage {