Added keybind support.

This commit is contained in:
apoorv569
2021-05-13 23:07:18 +05:30
parent db238e6958
commit 78841294d3
5 changed files with 203 additions and 24 deletions
+9 -9
View File
@@ -224,16 +224,16 @@ MainFrame::MainFrame()
Bind(wxEVT_BUTTON, &MainFrame::OnClickCollectionAdd, this, BC_CollectionViewAdd);
Bind(wxEVT_BUTTON, &MainFrame::OnClickCollectionRemove, this, BC_CollectionViewRemove);
// Setting up keybindings
wxAcceleratorEntry entries[5];
entries[0].Set(wxACCEL_NORMAL, (int) 'P', BC_Play);
entries[1].Set(wxACCEL_NORMAL, (int) 'L', BC_Loop);
entries[2].Set(wxACCEL_NORMAL, (int) 'S', BC_Stop);
entries[3].Set(wxACCEL_NORMAL, (int) 'M', BC_Mute);
entries[4].Set(wxACCEL_NORMAL, (int) 'O', BC_Settings);
// // Setting up keybindings
// wxAcceleratorEntry entries[5];
// entries[0].Set(wxACCEL_NORMAL, (int) 'P', BC_Play);
// entries[1].Set(wxACCEL_NORMAL, (int) 'L', BC_Loop);
// entries[2].Set(wxACCEL_NORMAL, (int) 'S', BC_Stop);
// entries[3].Set(wxACCEL_NORMAL, (int) 'M', BC_Mute);
// entries[4].Set(wxACCEL_NORMAL, (int) 'O', BC_Settings);
wxAcceleratorTable accel(5, entries);
this->SetAcceleratorTable(accel);
// wxAcceleratorTable accel(5, entries);
// this->SetAcceleratorTable(accel);
// Adding widgets to their sizers
m_MainSizer->Add(m_MainPanel, 1, wxALL | wxEXPAND, 0);