Browse buttons

This commit is contained in:
TheKodeToad 2024-06-20 01:45:47 +01:00
parent 0c5b6e4a73
commit bd85e982e5
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E

View file

@ -3,8 +3,26 @@
InstallerFrame::InstallerFrame() : InstallerFrame_UI(nullptr) { InstallerFrame::InstallerFrame() : InstallerFrame_UI(nullptr) {
heading->SetFont(heading->GetFont().Scaled(1.6F)); heading->SetFont(heading->GetFont().Scaled(1.6F));
launcher_data_dir_input->ChangeValue(get_launcher_data_dir().GetFullPath());
game_data_dir_input->SetHint(_("Use Default"));
cancel->Bind(wxEVT_BUTTON, [this] (wxCommandEvent &) { Close(); }); launcher_data_dir_input->ChangeValue(get_launcher_data_dir().GetFullPath());
launcher_data_dir_browse->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) {
wxDirDialog dialog(this, _("Select launcher data directory"));
if (dialog.ShowModal() != wxID_OK)
return;
game_data_dir_input->ChangeValue(dialog.GetPath());
});
game_data_dir_input->SetHint(_("Use Default"));
game_data_dir_browse->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) {
wxDirDialog dialog(this, _("Select game data directory"));
if (dialog.ShowModal() != wxID_OK)
return;
game_data_dir_input->ChangeValue(dialog.GetPath());
});
cancel->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { Close(); });
} }