diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-13 12:47:54 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-13 12:47:54 -0400 |
| commit | dfddd07b8b5cbff7c09103a694aed40bda254a2d (patch) | |
| tree | 220364fa26eff54d9a3fd49f1b52a8afce2bf907 /src/settings_dialog.cpp | |
| parent | dacbe8e3fbda85f7c2e7e7b660795f2a080a9d25 (diff) | |
| download | lingo-ap-tracker-dfddd07b8b5cbff7c09103a694aed40bda254a2d.tar.gz lingo-ap-tracker-dfddd07b8b5cbff7c09103a694aed40bda254a2d.tar.bz2 lingo-ap-tracker-dfddd07b8b5cbff7c09103a694aed40bda254a2d.zip | |
Obsolete savefile reader + IPC solves
Now, panel solve state is all read from the sync fields in datastorage. The "show hunt panels" field in settings is now a radio box, and you can choose to show all panels.
Diffstat (limited to 'src/settings_dialog.cpp')
| -rw-r--r-- | src/settings_dialog.cpp | 48 |
1 files changed, 28 insertions, 20 deletions
| diff --git a/src/settings_dialog.cpp b/src/settings_dialog.cpp index fa7a82f..95df577 100644 --- a/src/settings_dialog.cpp +++ b/src/settings_dialog.cpp | |||
| @@ -3,35 +3,43 @@ | |||
| 3 | #include "tracker_config.h" | 3 | #include "tracker_config.h" |
| 4 | 4 | ||
| 5 | SettingsDialog::SettingsDialog() : wxDialog(nullptr, wxID_ANY, "Settings") { | 5 | SettingsDialog::SettingsDialog() : wxDialog(nullptr, wxID_ANY, "Settings") { |
| 6 | should_check_for_updates_box_ = new wxCheckBox( | 6 | wxStaticBoxSizer* main_box = |
| 7 | this, wxID_ANY, "Check for updates when the tracker opens"); | 7 | new wxStaticBoxSizer(wxVERTICAL, this, "General settings"); |
| 8 | |||
| 9 | should_check_for_updates_box_ = | ||
| 10 | new wxCheckBox(main_box->GetStaticBox(), wxID_ANY, | ||
| 11 | "Check for updates when the tracker opens"); | ||
| 8 | hybrid_areas_box_ = new wxCheckBox( | 12 | hybrid_areas_box_ = new wxCheckBox( |
| 9 | this, wxID_ANY, | 13 | main_box->GetStaticBox(), wxID_ANY, |
| 10 | "Use two colors to show that an area has partial availability"); | 14 | "Use two colors to show that an area has partial availability"); |
| 11 | show_hunt_panels_box_ = new wxCheckBox(this, wxID_ANY, "Show hunt panels"); | 15 | track_position_box_ = new wxCheckBox(main_box->GetStaticBox(), wxID_ANY, |
| 12 | track_position_box_ = new wxCheckBox(this, wxID_ANY, "Track player position"); | 16 | "Track player position"); |
| 13 | 17 | ||
| 14 | should_check_for_updates_box_->SetValue( | 18 | should_check_for_updates_box_->SetValue( |
| 15 | GetTrackerConfig().should_check_for_updates); | 19 | GetTrackerConfig().should_check_for_updates); |
| 16 | hybrid_areas_box_->SetValue(GetTrackerConfig().hybrid_areas); | 20 | hybrid_areas_box_->SetValue(GetTrackerConfig().hybrid_areas); |
| 17 | show_hunt_panels_box_->SetValue(GetTrackerConfig().show_hunt_panels); | ||
| 18 | track_position_box_->SetValue(GetTrackerConfig().track_position); | 21 | track_position_box_->SetValue(GetTrackerConfig().track_position); |
| 19 | 22 | ||
| 20 | wxBoxSizer* form_sizer = new wxBoxSizer(wxVERTICAL); | 23 | main_box->Add(should_check_for_updates_box_, wxSizerFlags().Border()); |
| 21 | 24 | main_box->AddSpacer(2); | |
| 22 | form_sizer->Add(should_check_for_updates_box_, wxSizerFlags().HorzBorder()); | 25 | main_box->Add(hybrid_areas_box_, wxSizerFlags().Border()); |
| 23 | form_sizer->AddSpacer(2); | 26 | main_box->AddSpacer(2); |
| 24 | 27 | main_box->Add(track_position_box_, wxSizerFlags().Border()); | |
| 25 | form_sizer->Add(hybrid_areas_box_, wxSizerFlags().HorzBorder()); | 28 | |
| 26 | form_sizer->AddSpacer(2); | 29 | const wxString visible_panels_choices[] = {"Only show locations", |
| 30 | "Show locations and hunt panels", | ||
| 31 | "Show all panels"}; | ||
| 32 | visible_panels_box_ = | ||
| 33 | new wxRadioBox(this, wxID_ANY, "Visible panels", wxDefaultPosition, | ||
| 34 | wxDefaultSize, 3, visible_panels_choices, 1); | ||
| 35 | visible_panels_box_->SetSelection( | ||
| 36 | static_cast<int>(GetTrackerConfig().visible_panels)); | ||
| 27 | 37 | ||
| 28 | form_sizer->Add(show_hunt_panels_box_, wxSizerFlags().HorzBorder()); | 38 | wxBoxSizer* form_sizer = new wxBoxSizer(wxVERTICAL); |
| 29 | form_sizer->AddSpacer(2); | 39 | form_sizer->Add(main_box, wxSizerFlags().Border().Expand()); |
| 30 | 40 | form_sizer->Add(visible_panels_box_, wxSizerFlags().Border().Expand()); | |
| 31 | form_sizer->Add(track_position_box_, wxSizerFlags().HorzBorder()); | 41 | form_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), |
| 32 | form_sizer->AddSpacer(2); | 42 | wxSizerFlags().Center().Border()); |
| 33 | |||
| 34 | form_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Center()); | ||
| 35 | 43 | ||
| 36 | SetSizerAndFit(form_sizer); | 44 | SetSizerAndFit(form_sizer); |
| 37 | 45 | ||
