From a9bc708c7eeeada4c59952ce71aa071175f8f27d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 17 Nov 2023 10:11:41 -0500 Subject: Added hybrid areas and settings dialog --- src/settings_dialog.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/settings_dialog.cpp (limited to 'src/settings_dialog.cpp') diff --git a/src/settings_dialog.cpp b/src/settings_dialog.cpp new file mode 100644 index 0000000..58e5988 --- /dev/null +++ b/src/settings_dialog.cpp @@ -0,0 +1,29 @@ +#include "settings_dialog.h" + +#include "tracker_config.h" + +SettingsDialog::SettingsDialog() : wxDialog(nullptr, wxID_ANY, "Settings") { + should_check_for_updates_box_ = new wxCheckBox( + this, wxID_ANY, "Check for updates when the tracker opens"); + hybrid_areas_box_ = new wxCheckBox( + this, wxID_ANY, + "Use two colors to show that an area has partial availability"); + + should_check_for_updates_box_->SetValue( + GetTrackerConfig().should_check_for_updates); + hybrid_areas_box_->SetValue(GetTrackerConfig().hybrid_areas); + + wxBoxSizer* form_sizer = new wxBoxSizer(wxVERTICAL); + + form_sizer->Add(should_check_for_updates_box_, wxSizerFlags().HorzBorder()); + form_sizer->AddSpacer(2); + + form_sizer->Add(hybrid_areas_box_, wxSizerFlags().HorzBorder()); + form_sizer->AddSpacer(2); + + form_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Center()); + + SetSizerAndFit(form_sizer); + + Center(); +} -- cgit 1.4.1