diff options
Diffstat (limited to 'Archipelago/settings_screen.gd')
-rw-r--r-- | Archipelago/settings_screen.gd | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 9c4d59a..0eb68cf 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -26,6 +26,7 @@ func _ready(): | |||
26 | installScriptExtension("user://maps/Archipelago/panelEnd.gd") | 26 | installScriptExtension("user://maps/Archipelago/panelEnd.gd") |
27 | 27 | ||
28 | global.get_node("Archipelago").connect("client_connected", self, "connectionSuccessful") | 28 | global.get_node("Archipelago").connect("client_connected", self, "connectionSuccessful") |
29 | global.get_node("Archipelago").connect("could_not_connect", self, "connectionUnsuccessful") | ||
29 | 30 | ||
30 | # Populate textboxes with AP settings. | 31 | # Populate textboxes with AP settings. |
31 | self.get_node("Panel/server_box").text = global.get_node("Archipelago").ap_server | 32 | self.get_node("Panel/server_box").text = global.get_node("Archipelago").ap_server |
@@ -62,3 +63,11 @@ func connectionSuccessful(): | |||
62 | global.map = "level1" | 63 | global.map = "level1" |
63 | global.save_file = apclient.getSaveFileName() | 64 | global.save_file = apclient.getSaveFileName() |
64 | var _discard = get_tree().change_scene("res://scenes/load_screen.tscn") | 65 | var _discard = get_tree().change_scene("res://scenes/load_screen.tscn") |
66 | |||
67 | |||
68 | func connectionUnsuccessful(error_message): | ||
69 | var popup = self.get_node("Panel/AcceptDialog") | ||
70 | popup.window_title = "Could not connect to Archipelago" | ||
71 | popup.dialog_text = error_message | ||
72 | popup.popup_exclusive = true | ||
73 | popup.popup_centered() | ||