mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Make the hotkey dialog close when the escape key is pressed. I commit this as an example of how all dialogs should be set up. The buttons used to close the dialog should use wxID_OK or wxID_CANCEL. Alternatively you can use SetEscapeId or SetAffirmativeId to set the escape id to the id you use.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7350 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -44,29 +44,21 @@ class HotkeyConfigDialog : public wxDialog
|
||||
const wxString &title = _("Hotkey Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE | wxWANTS_CHARS);
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
virtual ~HotkeyConfigDialog();
|
||||
|
||||
wxTimer *m_ButtonMappingTimer;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
enum
|
||||
{
|
||||
ID_CLOSE = 1000,
|
||||
IDTM_BUTTON, // Timer
|
||||
ID_APPLY
|
||||
};
|
||||
|
||||
wxString OldLabel;
|
||||
|
||||
wxButton *m_Close, *m_Apply, *ClickedButton,
|
||||
wxButton *ClickedButton,
|
||||
*m_Button_Hotkeys[NUM_HOTKEYS];
|
||||
wxRadioButton *m_Radio_FSPause[5];
|
||||
|
||||
wxTimer *m_ButtonMappingTimer;
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CloseClick(wxCommandEvent& event);
|
||||
void CloseClick(wxCommandEvent& WXUNUSED(event));
|
||||
void OnButtonTimer(wxTimerEvent& WXUNUSED(event)) { DoGetButtons(GetButtonWaitingID); }
|
||||
void OnButtonClick(wxCommandEvent& event);
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
@ -74,7 +66,6 @@ class HotkeyConfigDialog : public wxDialog
|
||||
void CreateHotkeyGUIControls(void);
|
||||
|
||||
void SetButtonText(int id, const wxString &keystr, const wxString &modkeystr = wxString());
|
||||
wxString GetButtonText(int id);
|
||||
|
||||
void DoGetButtons(int id);
|
||||
void EndGetButtons(void);
|
||||
|
Reference in New Issue
Block a user