summaryrefslogtreecommitdiff
path: root/Scripts/Terminal/OutputBlock.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/Terminal/OutputBlock.cs')
-rw-r--r--Scripts/Terminal/OutputBlock.cs37
1 files changed, 18 insertions, 19 deletions
diff --git a/Scripts/Terminal/OutputBlock.cs b/Scripts/Terminal/OutputBlock.cs
index 4512446..3f50f44 100644
--- a/Scripts/Terminal/OutputBlock.cs
+++ b/Scripts/Terminal/OutputBlock.cs
@@ -1,29 +1,28 @@
using Godot;
-namespace Texty.Scripts.Terminal
+namespace Texty.Scripts.Terminal;
+
+[Tool]
+public partial class OutputBlock : MarginContainer
{
- [Tool]
- public partial class OutputBlock : MarginContainer
- {
- private string _content = "";
+ private string _content = "";
- private RichTextLabel ContentLabel => GetNodeOrNull<RichTextLabel>($"%{nameof(ContentLabel)}");
+ private RichTextLabel ContentLabel => GetNodeOrNull<RichTextLabel>($"%{nameof(ContentLabel)}");
- [Export(PropertyHint.MultilineText)]
- public string Content
+ [Export(PropertyHint.MultilineText)]
+ public string Content
+ {
+ get => ContentLabel?.Text ?? "";
+ set
{
- get => ContentLabel?.Text ?? "";
- set
- {
- _content = value;
- if (ContentLabel != null)
- ContentLabel.Text = GodotSharp.Singleton.Tr(_content);
- }
+ _content = value;
+ if (ContentLabel != null)
+ ContentLabel.Text = GodotSharp.Singleton.Tr(_content);
}
+ }
- public override void _Ready()
- {
- Content = _content;
- }
+ public override void _Ready()
+ {
+ Content = _content;
}
} \ No newline at end of file