From e127ad39e742396030352240d829bc903b1d4464 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Mon, 3 Oct 2022 22:22:50 +0200 Subject: godot: inital Godot 4 migration --- Scripts/Game/CommandInputArea.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Scripts/Game/CommandInputArea.cs') diff --git a/Scripts/Game/CommandInputArea.cs b/Scripts/Game/CommandInputArea.cs index 2f1fc09..af54a15 100644 --- a/Scripts/Game/CommandInputArea.cs +++ b/Scripts/Game/CommandInputArea.cs @@ -4,10 +4,10 @@ using Texty.Scripts.Terminal; namespace Texty.Scripts.Game { [Tool] - public class CommandInputArea : InputArea + public partial class CommandInputArea : InputArea { - [Signal] public delegate void CommandSubmitted(Command command); - [Signal] public delegate void UnknownInputSubmitted(string text); + [Signal] public delegate void CommandSubmittedEventHandler(Command command); + [Signal] public delegate void UnknownInputSubmittedEventHandler(string text); private CommandParser CommandParser => GetNodeOrNull($"%{nameof(CommandParser)}"); @@ -18,15 +18,15 @@ namespace Texty.Scripts.Game public override void OnTextEntered(string text) { - if (text.Empty()) + if (text.Length == 0) return; TextInput.Clear(); var command = CommandParser.TryParse(text); if (command != null) - EmitSignal(nameof(CommandSubmitted), command); + EmitSignal(SignalName.CommandSubmitted, command); else - EmitSignal(nameof(UnknownInputSubmitted), text); + EmitSignal(SignalName.UnknownInputSubmitted, text); } } } \ No newline at end of file -- cgit v1.2.3