Improved UI
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user