blob: 4a3fb230bb13b66af90d90a4be68d46920c8d11c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
}
}
}
|