blob: ef98a0a6cc36042cb13f12da7a3c0514b718cb6c (
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
|
using Godot;
namespace Texty.Scripts.Game
{
public class StatusLine : PanelContainer
{
private string _titleText = "Title Text";
private RichTextLabel TitleLabel => GetNodeOrNull<RichTextLabel>($"%{nameof(TitleLabel)}");
[Export]
public string Title
{
get => _titleText;
set
{
_titleText = value;
if (TitleLabel != null)
TitleLabel.Text = GodotSharp.Singleton.Tr(value);
}
}
public override void _Ready()
{
Title = _titleText;
}
}
}
|