diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-10-03 22:22:50 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-10-04 22:18:18 +0200 |
| commit | e127ad39e742396030352240d829bc903b1d4464 (patch) | |
| tree | 10cc21d70bf13181aef7c8ad0344077ff63579a3 /Scripts/Game/CommandInputArea.cs | |
| parent | ddbb045f6387a8ba23b1210b27a745516a387a52 (diff) | |
| download | texty-e127ad39e742396030352240d829bc903b1d4464.tar.xz texty-e127ad39e742396030352240d829bc903b1d4464.zip | |
godot: inital Godot 4 migration
Diffstat (limited to 'Scripts/Game/CommandInputArea.cs')
| -rw-r--r-- | Scripts/Game/CommandInputArea.cs | 12 |
1 files changed, 6 insertions, 6 deletions
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<CommandParser>($"%{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 |
