extends Node



func _on_host_button_pressed() -> void:
	Lobby.host()
	$MainMenu.hide()
	$Lobby.show()


func _on_connect_button_pressed() -> void:
	var ip = $MainMenu/VBoxContainer/LineEdit.text
	if ip == "":
		ip = "localhost"
	var joined = Lobby.join(ip)
	if joined != Error.OK:
		return
	$MainMenu.hide()
	$Lobby.show()
