mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
More work on making dialogs close when escape is pressed, and some general GUI code clean up.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7360 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -63,7 +63,7 @@ void HotkeyConfigDialog::EndGetButtons(void)
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
SetEscapeId(wxID_OK);
|
||||
SetEscapeId(wxID_ANY);
|
||||
}
|
||||
|
||||
void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||
@ -159,7 +159,7 @@ void HotkeyConfigDialog::OnButtonClick(wxCommandEvent& event)
|
||||
|
||||
// Get the button
|
||||
ClickedButton = (wxButton *)event.GetEventObject();
|
||||
SetEscapeId(wxID_NONE);
|
||||
SetEscapeId(wxID_CANCEL);
|
||||
// Save old label so we can revert back
|
||||
OldLabel = ClickedButton->GetLabel();
|
||||
ClickedButton->SetWindowStyle(wxWANTS_CHARS);
|
||||
@ -281,13 +281,9 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
|
||||
Page->SetSizer(sPage);
|
||||
}
|
||||
|
||||
wxBoxSizer* sButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
sButtons->AddStretchSpacer();
|
||||
sButtons->Add(new wxButton(this, wxID_OK, _("Close")), 0, (wxLEFT), 5);
|
||||
|
||||
wxBoxSizer *sMainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
sMainSizer->Add(Notebook, 0, wxEXPAND | wxALL, 5);
|
||||
sMainSizer->Add(sButtons, 0, wxEXPAND | (wxLEFT | wxRIGHT | wxDOWN), 5);
|
||||
sMainSizer->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxLEFT | wxRIGHT | wxDOWN, 5);
|
||||
SetSizerAndFit(sMainSizer);
|
||||
SetFocus();
|
||||
}
|
||||
|
Reference in New Issue
Block a user