tochie-facade/scenes/shell/ServerResources.gd

20 lines
564 B
GDScript3
Raw Permalink Normal View History

2023-09-25 07:57:50 +00:00
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()