online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/chat/TextEditor.gd')
-rw-r--r--ui/chat/TextEditor.gd6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/chat/TextEditor.gd b/ui/chat/TextEditor.gd
index a3e75eb..22bdeaa 100644
--- a/ui/chat/TextEditor.gd
+++ b/ui/chat/TextEditor.gd
@@ -17,12 +17,14 @@ signal done(text)
onready var textedit: TextEdit = $"%text"
onready var placeholder := $"%placeholder"
-onready var sendbutton := $"%SendButton"
+
+
+func _ready():
+ $"%SendButton".visible = OS.has_touchscreen_ui_hint()
func _text_changed() -> void:
placeholder.visible = len(textedit.text) == 0
- sendbutton.visible = len(textedit.text) != 0
func send(msg := textedit.text) -> void: