From 4fb25ff5efe48ca8f594ce5b5d2839cb244018a9 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 17 Dec 2024 16:32:10 -0500 Subject: Added solved panels over IPC --- src/tracker_panel.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/tracker_panel.cpp') diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 2f2d596..04b970c 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp @@ -51,6 +51,10 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) { } void TrackerPanel::UpdateIndicators() { + if (panels_mode_ && !savedata_path_) { + solved_panels_ = IPC_GetSolvedPanels(); + } + for (AreaIndicator &area : areas_) { area.popup->UpdateIndicators(); } @@ -58,8 +62,10 @@ void TrackerPanel::UpdateIndicators() { Redraw(); } +void TrackerPanel::SetPanelsMode() { panels_mode_ = true; } + void TrackerPanel::SetSavedataPath(std::string savedata_path) { - if (!panels_mode_) { + if (!savedata_path_) { wxButton *refresh_button = new wxButton(this, wxID_ANY, "Refresh", {15, 15}); refresh_button->Bind(wxEVT_BUTTON, &TrackerPanel::OnRefreshSavedata, this); @@ -216,7 +222,7 @@ void TrackerPanel::Redraw() { if (panel.non_counting) { has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); } else { - has_unchecked = !solved_panels_.contains(panel.nodepath); + has_unchecked = !GetSolvedPanels().contains(panel.nodepath); } } } else if (AP_IsLocationVisible(section.classification)) { -- cgit 1.4.1