From d7eefa488135c477f39ea0953b032c7dcdad8bc7 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Sat, 26 Nov 2022 10:08:44 +0100 Subject: scripts: perform code cleanup actions --- Scripts/Terminal/OutputBlock.cs | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'Scripts/Terminal/OutputBlock.cs') 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($"%{nameof(ContentLabel)}"); + private RichTextLabel ContentLabel => GetNodeOrNull($"%{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 -- cgit v1.2.3