From 1994afbdb4f6925cf69bdfe0411a3e3706aa9613 Mon Sep 17 00:00:00 2001 From: lealeelu Date: Thu, 2 Mar 2017 12:52:52 -0500 Subject: [PATCH] Add auto scrolling --- Assets/Fungus/Scripts/Components/NarrativeLog.cs | 2 +- Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Fungus/Scripts/Components/NarrativeLog.cs b/Assets/Fungus/Scripts/Components/NarrativeLog.cs index d2b6de6a..8a7a7f6c 100644 --- a/Assets/Fungus/Scripts/Components/NarrativeLog.cs +++ b/Assets/Fungus/Scripts/Components/NarrativeLog.cs @@ -112,7 +112,7 @@ namespace Fungus /// public string GetPrettyHistory(bool previousOnly = false) { - string output = ""; + string output = "\n "; int count; count = previousOnly ? history.lines.Count - 1: history.lines.Count; diff --git a/Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs b/Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs index ccb5bcf0..89645ad4 100644 --- a/Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs +++ b/Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs @@ -131,6 +131,9 @@ namespace Fungus { historyText.text = FungusManager.Instance.NarrativeLog.GetPrettyHistory(); } + Canvas.ForceUpdateCanvases(); + narrativeLogView.verticalNormalizedPosition = 0f; + Canvas.ForceUpdateCanvases(); } }