diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-11-26 10:08:44 +0100 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-11-26 10:08:44 +0100 |
| commit | d7eefa488135c477f39ea0953b032c7dcdad8bc7 (patch) | |
| tree | d9725b73b342ff3d9df4d800616dd010b48c7222 /Scripts/Terminal/OutputBlock.cs | |
| parent | 8e8a58bac339aa06e860b977670f16c8b4eb30a8 (diff) | |
| download | texty-d7eefa488135c477f39ea0953b032c7dcdad8bc7.tar.xz texty-d7eefa488135c477f39ea0953b032c7dcdad8bc7.zip | |
scripts: perform code cleanup actions
Diffstat (limited to 'Scripts/Terminal/OutputBlock.cs')
| -rw-r--r-- | Scripts/Terminal/OutputBlock.cs | 37 |
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 |
