From bb12ecd88fe16e4009b0d8927c5653d72972e284 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 21 May 2023 13:16:25 -0400 Subject: Show list of achievements on the side --- src/tracker_frame.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/tracker_frame.cpp') diff --git a/src/tracker_frame.cpp b/src/tracker_frame.cpp index 0308886..49f947f 100644 --- a/src/tracker_frame.cpp +++ b/src/tracker_frame.cpp @@ -1,10 +1,12 @@ #include "tracker_frame.h" +#include #include #include #include +#include "achievements_pane.h" #include "ap_state.h" #include "connection_dialog.h" #include "tracker_config.h" @@ -50,8 +52,18 @@ TrackerFrame::TrackerFrame() Bind(STATE_CHANGED, &TrackerFrame::OnStateChanged, this); Bind(STATUS_CHANGED, &TrackerFrame::OnStatusChanged, this); + wxChoicebook *choicebook = new wxChoicebook(this, wxID_ANY); + achievements_pane_ = new AchievementsPane(this); + choicebook->AddPage(achievements_pane_, "Achievements"); + tracker_panel_ = new TrackerPanel(this); + wxBoxSizer *top_sizer = new wxBoxSizer(wxHORIZONTAL); + top_sizer->Add(choicebook, wxSizerFlags().Expand().Proportion(1)); + top_sizer->Add(tracker_panel_, wxSizerFlags().Expand().Proportion(3)); + + SetSizerAndFit(top_sizer); + if (!GetTrackerConfig().asked_to_check_for_updates) { GetTrackerConfig().asked_to_check_for_updates = true; @@ -113,6 +125,7 @@ void TrackerFrame::OnCheckForUpdates(wxCommandEvent &event) { void TrackerFrame::OnStateChanged(wxCommandEvent &event) { tracker_panel_->UpdateIndicators(); + achievements_pane_->UpdateIndicators(); Refresh(); } -- cgit 1.4.1