From 249817743c12b453338c6d0a355180bf5084c73c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 16 May 2024 09:41:02 -0400 Subject: Added status bar stuff back --- src/ap_state.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 4a15db0..f245c2b 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp @@ -107,6 +107,7 @@ struct APState { initialized = true; } + tracker_frame->SetStatusMessage("Connecting to Archipelago server...."); wxLogStatus("Connecting to Archipelago server (%s)...", server); { @@ -154,11 +155,12 @@ struct APState { apclient->set_room_info_handler([this, player, password]() { inventory.clear(); - wxLogStatus( + wxLogStatus("Connected to Archipelago server. Authenticating as %s %s", + player, + (password.empty() ? "without password" + : "with password " + password)); + tracker_frame->SetStatusMessage( "Connected to Archipelago server. Authenticating..."); - wxLogVerbose("Authenticating as %s %s", player, - (password.empty() ? "without password" - : "with password " + password)); apclient->ConnectSlot(player, password, ITEM_HANDLING, {"Tracker"}, {AP_MAJOR, AP_MINOR, AP_REVISION}); @@ -175,11 +177,15 @@ struct APState { }); apclient->set_slot_disconnected_handler([this]() { + tracker_frame->SetStatusMessage( + "Disconnected from Archipelago. Attempting to reconnect..."); wxLogStatus( "Slot disconnected from Archipelago. Attempting to reconnect..."); }); apclient->set_socket_disconnected_handler([this]() { + tracker_frame->SetStatusMessage( + "Disconnected from Archipelago. Attempting to reconnect..."); wxLogStatus( "Socket disconnected from Archipelago. Attempting to reconnect..."); }); @@ -212,6 +218,7 @@ struct APState { apclient->set_slot_connected_handler([this]( const nlohmann::json& slot_data) { + tracker_frame->SetStatusMessage("Connected to Archipelago!"); wxLogStatus("Connected to Archipelago!"); data_storage_prefix = @@ -333,6 +340,7 @@ struct APState { DestroyClient(); + tracker_frame->SetStatusMessage("Disconnected from Archipelago."); wxLogStatus("Timeout while connecting to Archipelago server."); wxMessageBox("Timeout while connecting to Archipelago server.", "Connection failed", wxOK | wxICON_ERROR); -- cgit 1.4.1