summaryrefslogtreecommitdiff
path: root/Scripts/Game/CommandInputArea.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/Game/CommandInputArea.cs')
-rw-r--r--Scripts/Game/CommandInputArea.cs12
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