tochie-facade/scenes/shell/ConnectionPopup.gd

17 lines
504 B
GDScript3
Raw Normal View History

2023-09-25 07:57:50 +00:00
extends WindowDialog
signal auth_entered(user, password)
func _ready() -> void:
if connect("hide", self, "_on_hidden") != OK:
assert(false)
if find_node("Connect").connect("pressed", self, "_on_connect_pressed") != OK:
assert(false)
func _on_hidden() -> void:
find_node("UserEdit").text = "user"
find_node("PasswordEdit").text = "password"
func _on_connect_pressed() -> void:
emit_signal("auth_entered", find_node("UserEdit").text, find_node("PasswordEdit").text)