summaryrefslogtreecommitdiff
path: root/Scripts/Terminal/MenuScreen.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/Terminal/MenuScreen.cs')
-rw-r--r--Scripts/Terminal/MenuScreen.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Scripts/Terminal/MenuScreen.cs b/Scripts/Terminal/MenuScreen.cs
new file mode 100644
index 0000000..5c3abfb
--- /dev/null
+++ b/Scripts/Terminal/MenuScreen.cs
@@ -0,0 +1,27 @@
+using Godot;
+
+namespace Texty.Scripts.Terminal
+{
+ [Tool]
+ public class MenuScreen : Control
+ {
+ private string _title = "";
+ private StatusArea TitleArea => GetNodeOrNull<StatusArea>($"%{nameof(TitleArea)}");
+
+ [Export]
+ public string Title
+ {
+ get => _title;
+ set
+ {
+ _title = value;
+ if (TitleArea != null) TitleArea.Title = $"[center]{GodotSharp.Singleton.Tr(_title)}[/center]";
+ }
+ }
+
+ public override void _Ready()
+ {
+ Title = _title;
+ }
+ }
+} \ No newline at end of file