diff options
Diffstat (limited to 'Scripts/Game/StatusLine.cs')
| -rw-r--r-- | Scripts/Game/StatusLine.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Scripts/Game/StatusLine.cs b/Scripts/Game/StatusLine.cs new file mode 100644 index 0000000..4a3fb23 --- /dev/null +++ b/Scripts/Game/StatusLine.cs @@ -0,0 +1,30 @@ +using Godot; + +namespace Texty.Scripts.Game +{ + public class StatusLine : PanelContainer + { + private string _titleText = "Title Text"; + + [Export] + public string Title + { + get => _titleText; + set + { + if (TitleLabel != null) + TitleLabel.Text = value; + _titleText = value; + } + } + + public RichTextLabel TitleLabel; + + public override void _Ready() + { + TitleLabel = GetNode<RichTextLabel>($"%{nameof(TitleLabel)}"); + TitleLabel.Text = _titleText; + } + } +} + |
