Browse Source

Add auto scrolling

master
lealeelu 8 years ago
parent
commit
1994afbdb4
  1. 2
      Assets/Fungus/Scripts/Components/NarrativeLog.cs
  2. 3
      Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs

2
Assets/Fungus/Scripts/Components/NarrativeLog.cs

@ -112,7 +112,7 @@ namespace Fungus
/// <returns></returns> /// <returns></returns>
public string GetPrettyHistory(bool previousOnly = false) public string GetPrettyHistory(bool previousOnly = false)
{ {
string output = ""; string output = "\n ";
int count; int count;
count = previousOnly ? history.lines.Count - 1: history.lines.Count; count = previousOnly ? history.lines.Count - 1: history.lines.Count;

3
Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs

@ -131,6 +131,9 @@ namespace Fungus
{ {
historyText.text = FungusManager.Instance.NarrativeLog.GetPrettyHistory(); historyText.text = FungusManager.Instance.NarrativeLog.GetPrettyHistory();
} }
Canvas.ForceUpdateCanvases();
narrativeLogView.verticalNormalizedPosition = 0f;
Canvas.ForceUpdateCanvases();
} }
} }

Loading…
Cancel
Save