diff options
-rw-r--r-- | Archipelago/client.gd | 7 | ||||
-rw-r--r-- | Archipelago/settings_screen.gd | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index e182b9c..f33c80c 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -91,6 +91,7 @@ var _progressive_progress = {} | |||
91 | var _has_colors = ["white"] | 91 | var _has_colors = ["white"] |
92 | 92 | ||
93 | signal could_not_connect | 93 | signal could_not_connect |
94 | signal connect_status | ||
94 | signal client_connected | 95 | signal client_connected |
95 | signal evaluate_solvability | 96 | signal evaluate_solvability |
96 | 97 | ||
@@ -459,6 +460,8 @@ func connectToServer(): | |||
459 | return | 460 | return |
460 | _should_process = true | 461 | _should_process = true |
461 | 462 | ||
463 | emit_signal("connect_status", "Connecting...") | ||
464 | |||
462 | 465 | ||
463 | func sendMessage(msg): | 466 | func sendMessage(msg): |
464 | var payload = JSON.print(msg) | 467 | var payload = JSON.print(msg) |
@@ -467,6 +470,8 @@ func sendMessage(msg): | |||
467 | 470 | ||
468 | 471 | ||
469 | func requestDatapackages(games): | 472 | func requestDatapackages(games): |
473 | emit_signal("connect_status", "Downloading %s data package..." % games[0]) | ||
474 | |||
470 | sendMessage([{"cmd": "GetDataPackage", "games": games}]) | 475 | sendMessage([{"cmd": "GetDataPackage", "games": games}]) |
471 | 476 | ||
472 | 477 | ||
@@ -486,6 +491,8 @@ func processDatapackages(): | |||
486 | 491 | ||
487 | 492 | ||
488 | func connectToRoom(): | 493 | func connectToRoom(): |
494 | emit_signal("connect_status", "Authenticating...") | ||
495 | |||
489 | sendMessage( | 496 | sendMessage( |
490 | [ | 497 | [ |
491 | { | 498 | { |
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 890afaa..efd301e 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -30,6 +30,7 @@ func _ready(): | |||
30 | var apclient = global.get_node("Archipelago") | 30 | var apclient = global.get_node("Archipelago") |
31 | apclient.connect("client_connected", self, "connectionSuccessful") | 31 | apclient.connect("client_connected", self, "connectionSuccessful") |
32 | apclient.connect("could_not_connect", self, "connectionUnsuccessful") | 32 | apclient.connect("could_not_connect", self, "connectionUnsuccessful") |
33 | apclient.connect("connect_status", self, "connectionStatus") | ||
33 | 34 | ||
34 | # Populate textboxes with AP settings. | 35 | # Populate textboxes with AP settings. |
35 | self.get_node("Panel/server_box").text = apclient.ap_server | 36 | self.get_node("Panel/server_box").text = apclient.ap_server |
@@ -70,6 +71,15 @@ func installScriptExtension(childScriptPath: String): | |||
70 | childScript.take_over_path(parentScriptPath) | 71 | childScript.take_over_path(parentScriptPath) |
71 | 72 | ||
72 | 73 | ||
74 | func connectionStatus(message): | ||
75 | var popup = self.get_node("Panel/AcceptDialog") | ||
76 | popup.window_title = "Connecting to Archipelago" | ||
77 | popup.dialog_text = message | ||
78 | popup.popup_exclusive = true | ||
79 | popup.get_ok().visible = false | ||
80 | popup.popup_centered() | ||
81 | |||
82 | |||
73 | func connectionSuccessful(): | 83 | func connectionSuccessful(): |
74 | var apclient = global.get_node("Archipelago") | 84 | var apclient = global.get_node("Archipelago") |
75 | 85 | ||
@@ -87,4 +97,5 @@ func connectionUnsuccessful(error_message): | |||
87 | popup.window_title = "Could not connect to Archipelago" | 97 | popup.window_title = "Could not connect to Archipelago" |
88 | popup.dialog_text = error_message | 98 | popup.dialog_text = error_message |
89 | popup.popup_exclusive = true | 99 | popup.popup_exclusive = true |
100 | popup.get_ok().visible = true | ||
90 | popup.popup_centered() | 101 | popup.popup_centered() |