20 lines
564 B
GDScript
20 lines
564 B
GDScript
extends Node
|
|
|
|
var n_Popup: Node
|
|
|
|
func _enter_tree() -> void:
|
|
n_Popup = preload("res://scenes/shell/ConnectionPopup.tscn").instance()
|
|
get_parent().call_deferred("add_child", n_Popup)
|
|
if n_Popup.connect("auth_entered", self, "_on_auth_entered") != OK:
|
|
assert(false)
|
|
|
|
func _on_auth_entered(user, password) -> void:
|
|
print(user, password)
|
|
|
|
func _ready() -> void:
|
|
if find_node("AddConnection").connect("pressed", self, "_on_add_new_server_pressed") != OK:
|
|
assert(false)
|
|
|
|
func _on_add_new_server_pressed() -> void:
|
|
n_Popup.popup()
|