diff options
| author | Sophia Pearson <codergal89@gmail.com> | 2022-09-05 20:35:53 +0200 |
|---|---|---|
| committer | Sophia Pearson <codergal89@gmail.com> | 2022-09-05 20:35:53 +0200 |
| commit | f20bd89dc4a7bf14a88b1effcaa1887b29314525 (patch) | |
| tree | d114787f68efd2a7d61d95fa9c84e8e5d69a7c11 /Scripts/Terminal/InputArea.cs | |
| parent | 1b477b62f8be8c546a35dbd1d2688ebf623c496f (diff) | |
| download | texty-f20bd89dc4a7bf14a88b1effcaa1887b29314525.tar.xz texty-f20bd89dc4a7bf14a88b1effcaa1887b29314525.zip | |
gui: split GUI into Terminal components
Diffstat (limited to 'Scripts/Terminal/InputArea.cs')
| -rw-r--r-- | Scripts/Terminal/InputArea.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Scripts/Terminal/InputArea.cs b/Scripts/Terminal/InputArea.cs new file mode 100644 index 0000000..eb78d38 --- /dev/null +++ b/Scripts/Terminal/InputArea.cs @@ -0,0 +1,15 @@ +using System; +using Godot; + +namespace Texty.Scripts.Terminal +{ + public abstract class InputArea : HBoxContainer + { + protected Label PromptLabel => GetNodeOrNull<Label>($"%{nameof(PromptLabel)}"); + protected LineEdit TextInput => GetNodeOrNull<LineEdit>($"%{nameof(TextInput)}"); + + public new bool HasFocus => TextInput?.HasFocus() ?? false; + + public abstract void OnTextEntered(string text); + } +}
\ No newline at end of file |
