Browse buttons
This commit is contained in:
parent
0c5b6e4a73
commit
bd85e982e5
|
@ -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());
|
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_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(); });
|
cancel->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { Close(); });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue