123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- extends Node
- var client = preload('res://Client.tscn')
- var server = preload('res://Server.tscn')
- signal login_confimed
- var login_await = true
- func _ready():
- for i in get_children():
- i.hide()
- $directconnect.show()
- func _on_Button_button_down():
- $directconnect.hide()
- $loginscreen.show()
- if login_await: yield(self,'login_confimed')
- $loginscreen.hide()
- var client2 = client.instance()
- var ip = $directconnect/VBoxContainer/HBoxContainer/LineEdit2.get_text()
- var port = $directconnect/VBoxContainer/HBoxContainer/LineEdit.get_text()
- client2.ip = ip
- client2.port = int(port)
- get_parent().add_child(client2)
- pass # Replace with function body.
- func _on_Button2_button_down():
- var server2 = server.instance()
- get_parent().add_child(server2)
- pass # Replace with function body.
- func _on_CheckButton_toggled(button_pressed):
- login_await = button_pressed
- pass # Replace with function body.
- func _on_register_button_down():
- $loginscreen.hide()
- $register.show()
- pass # Replace with function body.
- func _on_login2_button_down():
- $loginscreen.show()
- $register.hide()
- pass # Replace with function body.
|