From f20bd89dc4a7bf14a88b1effcaa1887b29314525 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Mon, 5 Sep 2022 20:35:53 +0200 Subject: gui: split GUI into Terminal components --- Scripts/Terminal/StatusArea.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Scripts/Terminal/StatusArea.cs (limited to 'Scripts/Terminal/StatusArea.cs') diff --git a/Scripts/Terminal/StatusArea.cs b/Scripts/Terminal/StatusArea.cs new file mode 100644 index 0000000..1b1b6e3 --- /dev/null +++ b/Scripts/Terminal/StatusArea.cs @@ -0,0 +1,27 @@ +using Godot; + +namespace Texty.Scripts.Terminal +{ + public class StatusArea : HBoxContainer + { + private string _titleText = ""; + private RichTextLabel TitleLabel => GetNodeOrNull($"%{nameof(TitleLabel)}"); + + [Export] + public string Title + { + get => _titleText; + set + { + _titleText = value; + if (TitleLabel != null) + TitleLabel.BbcodeText = GodotSharp.Singleton.Tr(value); + } + } + + public override void _Ready() + { + Title = _titleText; + } + } +} \ No newline at end of file -- cgit v1.2.3