mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
Change Input Config Dialogs to have only one 'Close' button
This commit is contained in:
parent
5608815cc8
commit
1951df97db
@ -202,10 +202,15 @@ void InputConfigDialog::UpdateControlReferences()
|
||||
}
|
||||
}
|
||||
|
||||
void InputConfigDialog::ClickSave(wxCommandEvent& event)
|
||||
void InputConfigDialog::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
m_config.SaveConfig();
|
||||
event.Skip();
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
void InputConfigDialog::OnCloseButton(wxCommandEvent& event)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
int ControlDialog::GetRangeSliderValue() const
|
||||
@ -1097,11 +1102,12 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputConfig& config
|
||||
UpdateDeviceComboBox();
|
||||
UpdateProfileComboBox();
|
||||
|
||||
Bind(wxEVT_BUTTON, &InputConfigDialog::ClickSave, this, wxID_OK);
|
||||
Bind(wxEVT_CLOSE_WINDOW, &InputConfigDialog::OnClose, this);
|
||||
Bind(wxEVT_BUTTON, &InputConfigDialog::OnCloseButton, this, wxID_CLOSE);
|
||||
|
||||
wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL);
|
||||
szr->Add(m_pad_notebook, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5);
|
||||
szr->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxEXPAND | wxALL, 5);
|
||||
szr->Add(CreateButtonSizer(wxCLOSE), 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED);
|
||||
SetSizerAndFit(szr);
|
||||
|
@ -252,7 +252,8 @@ public:
|
||||
InputConfigDialog(wxWindow* const parent, InputConfig& config, const wxString& name,
|
||||
const int tab_num = 0);
|
||||
|
||||
void ClickSave(wxCommandEvent& event);
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnCloseButton(wxCommandEvent& event);
|
||||
|
||||
void UpdateDeviceComboBox();
|
||||
void UpdateProfileComboBox();
|
||||
|
Loading…
Reference in New Issue
Block a user