pcsx2-gui: Add handlers for new menu options

This commit is contained in:
Tyler Wilding 2020-08-23 20:08:22 -04:00 committed by refractionpcsx2
parent b39f408afc
commit 1954c2ce09
3 changed files with 26 additions and 2 deletions

View File

@ -276,6 +276,9 @@ void MainEmuFrame::ConnectMenus()
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_New_Click, this, MenuId_Recording_New);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_Play_Click, this, MenuId_Recording_Play);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_Stop_Click, this, MenuId_Recording_Stop);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_TogglePause_Click, this, MenuId_Recording_TogglePause);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_FrameAdvance_Click, this, MenuId_Recording_FrameAdvance);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_ToggleRecordingMode_Click, this, MenuId_Recording_ToggleRecordingMode);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_VirtualPad_Open_Click, this, MenuId_Recording_VirtualPad_Port0);
Bind(wxEVT_MENU, &MainEmuFrame::Menu_Recording_VirtualPad_Open_Click, this, MenuId_Recording_VirtualPad_Port1);
#endif

View File

@ -167,7 +167,7 @@ public:
void AppendKeycodeNamesToMenuOptions();
void UpdateStatusBar();
#ifndef DISABLE_RECORDING
void AppendKeycodeNamesToRecordingMenuOptions(MenuIdentifiers menuId, wxString keyCodeStr);
void appendKeycodeNamesToRecordingMenuOptions(MenuIdentifiers menuId, wxString keyCodeStr);
#endif
protected:
@ -247,6 +247,9 @@ protected:
void Menu_Recording_New_Click(wxCommandEvent &event);
void Menu_Recording_Play_Click(wxCommandEvent &event);
void Menu_Recording_Stop_Click(wxCommandEvent &event);
void Menu_Recording_TogglePause_Click(wxCommandEvent &event);
void Menu_Recording_FrameAdvance_Click(wxCommandEvent &event);
void Menu_Recording_ToggleRecordingMode_Click(wxCommandEvent &event);
void Menu_Recording_VirtualPad_Open_Click(wxCommandEvent &event);
#endif

View File

@ -972,7 +972,25 @@ void MainEmuFrame::Menu_Recording_Stop_Click(wxCommandEvent &event)
m_menuRecording.FindChildItem(MenuId_Recording_Stop)->Enable(false);
}
void MainEmuFrame::Menu_Recording_VirtualPad_Open_Click(wxCommandEvent &event)
void MainEmuFrame::Menu_Recording_TogglePause_Click(wxCommandEvent& event)
{
if (g_Conf->EmuOptions.EnableRecordingTools)
g_RecordingControls.TogglePause();
}
void MainEmuFrame::Menu_Recording_FrameAdvance_Click(wxCommandEvent& event)
{
if (g_Conf->EmuOptions.EnableRecordingTools)
g_RecordingControls.FrameAdvance();
}
void MainEmuFrame::Menu_Recording_ToggleRecordingMode_Click(wxCommandEvent& event)
{
if (g_Conf->EmuOptions.EnableRecordingTools)
g_InputRecording.RecordModeToggle();
}
void MainEmuFrame::Menu_Recording_VirtualPad_Open_Click(wxCommandEvent& event)
{
wxGetApp().GetVirtualPadPtr(event.GetId() - MenuId_Recording_VirtualPad_Port0)->Show();
}