Move terminal text update to Update

This commit is contained in:
Jens Pitkänen 2020-08-07 21:28:43 +03:00
parent 8edd5a81fd
commit 2d41342790

View File

@ -98,6 +98,10 @@ namespace NeonTea.Quakeball.Interface {
InputField.ActivateInputField(); InputField.ActivateInputField();
InputField.readOnly = false; InputField.readOnly = false;
} }
if (IsOpen) {
Text = String.Join("\n", Messages);
TextField.text = Text;
}
} }
public bool RegisterCommand(string name, Func<string[], bool> command) { public bool RegisterCommand(string name, Func<string[], bool> command) {
@ -136,8 +140,6 @@ namespace NeonTea.Quakeball.Interface {
public int Println(string message) { public int Println(string message) {
Messages.Add(message); Messages.Add(message);
Text = String.Join("\n", Messages.ToArray());
TextField.text = Text;
return Messages.Count - 1; return Messages.Count - 1;
} }
@ -146,8 +148,6 @@ namespace NeonTea.Quakeball.Interface {
return; return;
} }
Messages[idx] = message; Messages[idx] = message;
Text = String.Join("\n", Messages.ToArray());
TextField.text = Text;
} }
private void Scroll(int amount) { private void Scroll(int amount) {