17 lines
504 B
GDScript
17 lines
504 B
GDScript
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)
|