Improved UI

This commit is contained in:
2024-02-16 23:45:31 +01:00
parent 2b7c1028cc
commit b6a83031f9
2 changed files with 27 additions and 3 deletions

View File

@ -1,5 +1,8 @@
extends LineEdit
func _ready():
modulate.a = 0.0
func _unhandled_input(event):
if Global.interacting_with_ui:
return
@ -9,9 +12,13 @@ func _unhandled_input(event):
get_viewport().set_input_as_handled()
func _on_focus_entered():
var tween := get_tree().create_tween()
tween.tween_property(self, "modulate", Color(1, 1, 1, 1), 0.2)
Global.interacting_with_ui = true
func _on_focus_exited():
var tween := get_tree().create_tween()
tween.tween_property(self, "modulate", Color(1, 1, 1, 0), 0.2)
Global.interacting_with_ui = false
func _on_text_submitted(message: String):