From 2d413427906023333f2b654d8f2e3a925a12e92a Mon Sep 17 00:00:00 2001 From: Jens Pitkanen Date: Fri, 7 Aug 2020 21:28:43 +0300 Subject: [PATCH] Move terminal text update to Update --- Assets/Scripts/Interface/Terminal.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Interface/Terminal.cs b/Assets/Scripts/Interface/Terminal.cs index a935171..9756751 100644 --- a/Assets/Scripts/Interface/Terminal.cs +++ b/Assets/Scripts/Interface/Terminal.cs @@ -98,6 +98,10 @@ namespace NeonTea.Quakeball.Interface { InputField.ActivateInputField(); InputField.readOnly = false; } + if (IsOpen) { + Text = String.Join("\n", Messages); + TextField.text = Text; + } } public bool RegisterCommand(string name, Func command) { @@ -136,8 +140,6 @@ namespace NeonTea.Quakeball.Interface { public int Println(string message) { Messages.Add(message); - Text = String.Join("\n", Messages.ToArray()); - TextField.text = Text; return Messages.Count - 1; } @@ -146,8 +148,6 @@ namespace NeonTea.Quakeball.Interface { return; } Messages[idx] = message; - Text = String.Join("\n", Messages.ToArray()); - TextField.text = Text; } private void Scroll(int amount) {