online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/chat/TextInput.gd')
| -rw-r--r-- | ui/chat/TextInput.gd | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/chat/TextInput.gd b/ui/chat/TextInput.gd new file mode 100644 index 0000000..c3a8134 --- /dev/null +++ b/ui/chat/TextInput.gd @@ -0,0 +1,18 @@ +extends Control + +signal send(message) + +onready var textedit := $h/MC/text +onready var placeholder := $h/MC/placeholder + + +func _on_text_changed() -> void: + placeholder.visible = len(textedit.text) == 0 + + +func _on_text_send(msg: String) -> void: + emit_signal("send", msg) + + +func setup_emojis(_emojis: Dictionary) -> void: + $h/MC2/EmojiButton._setup(_emojis) |