Added hotkeys for most of the commands available in the File and Emulation menus.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7145 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4b69ef3690
commit
e867341e4f
|
@ -31,23 +31,85 @@ static const struct {
|
||||||
const int DefaultModifier;
|
const int DefaultModifier;
|
||||||
} g_HKData[] = {
|
} g_HKData[] = {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
{ "ToggleFullscreen", 70 /* 'F' */, 0x08 /* wxMOD_CMD */ },
|
{ "Open", 0x4F /* WXK_O */, 0x02 /* wxMOD_CONTROL*/ },
|
||||||
|
{ "ChangeDisc", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "RefreshList", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
{ "PlayPause", 80 /* 'P' */, 0x08 /* wxMOD_CMD */ },
|
{ "PlayPause", 80 /* 'P' */, 0x08 /* wxMOD_CMD */ },
|
||||||
{ "Stop", 87 /* 'W' */, 0x08 /* wxMOD_CMD */ },
|
{ "Stop", 87 /* 'W' */, 0x08 /* wxMOD_CMD */ },
|
||||||
|
{ "Reset", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "FrameAdvance", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
|
{ "StartRecording", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "PlayRecording", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "ExportRecording", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "Readonlymode", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
|
{ "ToggleFullscreen", 70 /* 'F' */, 0x08 /* wxMOD_CMD */ },
|
||||||
{ "Screenshot", 83 /* 'S' */, 0x08 /* wxMOD_CMD */ },
|
{ "Screenshot", 83 /* 'S' */, 0x08 /* wxMOD_CMD */ },
|
||||||
|
|
||||||
{ "Wiimote1Connect", 49 /* '1' */, 0x08 /* wxMOD_CMD */ },
|
{ "Wiimote1Connect", 49 /* '1' */, 0x08 /* wxMOD_CMD */ },
|
||||||
{ "Wiimote2Connect", 50 /* '2' */, 0x08 /* wxMOD_CMD */ },
|
{ "Wiimote2Connect", 50 /* '2' */, 0x08 /* wxMOD_CMD */ },
|
||||||
{ "Wiimote3Connect", 51 /* '3' */, 0x08 /* wxMOD_CMD */ },
|
{ "Wiimote3Connect", 51 /* '3' */, 0x08 /* wxMOD_CMD */ },
|
||||||
{ "Wiimote4Connect", 52 /* '4' */, 0x08 /* wxMOD_CMD */ },
|
{ "Wiimote4Connect", 52 /* '4' */, 0x08 /* wxMOD_CMD */ },
|
||||||
|
|
||||||
|
{ "LoadStateSlot1", 340 /* WXK_F1 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot2", 341 /* WXK_F2 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot3", 342 /* WXK_F3 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot4", 343 /* WXK_F4 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot5", 344 /* WXK_F5 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot6", 345 /* WXK_F6 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot7", 346 /* WXK_F7 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot8", 347 /* WXK_F8 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
|
{ "SaveStateSlot1", 340 /* WXK_F1 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot2", 341 /* WXK_F2 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot3", 342 /* WXK_F3 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot4", 343 /* WXK_F4 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot5", 344 /* WXK_F5 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot6", 345 /* WXK_F6 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot7", 346 /* WXK_F7 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot8", 347 /* WXK_F8 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
#else
|
#else
|
||||||
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 0x01 /* wxMOD_ALT */ },
|
{ "Open", 0x4F /* WXK_O */, 0x02 /* wxMOD_CONTROL*/ },
|
||||||
|
{ "ChangeDisc", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "RefreshList", 00, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
{ "PlayPause", 349 /* WXK_F10 */, 0x00 /* wxMOD_NONE*/ },
|
{ "PlayPause", 349 /* WXK_F10 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
{ "Stop", 27 /* WXK_ESCAPE */, 0x00 /* wxMOD_NONE*/ },
|
{ "Stop", 27 /* WXK_ESCAPE */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "Reset", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "FrameAdvance", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
|
{ "StartRecording", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "PlayRecording", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "ExportRecording", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "Readonlymode", 0, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
|
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 0x01 /* wxMOD_ALT */ },
|
||||||
{ "Screenshot", 348 /* WXK_F9 */, 0x00 /* wxMOD_NONE*/ },
|
{ "Screenshot", 348 /* WXK_F9 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
{ "Wiimote1Connect", 344 /* WXK_F5 */, 0x01 /* wxMOD_ALT */ },
|
{ "Wiimote1Connect", 344 /* WXK_F5 */, 0x01 /* wxMOD_ALT */ },
|
||||||
{ "Wiimote2Connect", 345 /* WXK_F6 */, 0x01 /* wxMOD_ALT */ },
|
{ "Wiimote2Connect", 345 /* WXK_F6 */, 0x01 /* wxMOD_ALT */ },
|
||||||
{ "Wiimote3Connect", 346 /* WXK_F7 */, 0x01 /* wxMOD_ALT */ },
|
{ "Wiimote3Connect", 346 /* WXK_F7 */, 0x01 /* wxMOD_ALT */ },
|
||||||
{ "Wiimote4Connect", 347 /* WXK_F8 */, 0x01 /* wxMOD_ALT */ },
|
{ "Wiimote4Connect", 347 /* WXK_F8 */, 0x01 /* wxMOD_ALT */ },
|
||||||
|
|
||||||
|
{ "LoadStateSlot1", 340 /* WXK_F1 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot2", 341 /* WXK_F2 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot3", 342 /* WXK_F3 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot4", 343 /* WXK_F4 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot5", 344 /* WXK_F5 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot6", 345 /* WXK_F6 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot7", 346 /* WXK_F7 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
{ "LoadStateSlot8", 347 /* WXK_F8 */, 0x00 /* wxMOD_NONE*/ },
|
||||||
|
|
||||||
|
{ "SaveStateSlot1", 340 /* WXK_F1 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot2", 341 /* WXK_F2 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot3", 342 /* WXK_F3 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot4", 343 /* WXK_F4 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot5", 344 /* WXK_F5 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot6", 345 /* WXK_F6 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot7", 346 /* WXK_F7 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
|
{ "SaveStateSlot8", 347 /* WXK_F8 */, 0x04 /* wxMOD_SHIFT*/ },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,7 +178,7 @@ void SConfig::SaveSettings()
|
||||||
ini.Set("Interface", "ShowConsole", m_InterfaceConsole);
|
ini.Set("Interface", "ShowConsole", m_InterfaceConsole);
|
||||||
|
|
||||||
// Hotkeys
|
// Hotkeys
|
||||||
for (int i = HK_FULLSCREEN; i < NUM_HOTKEYS; i++)
|
for (int i = 0; i < NUM_HOTKEYS; i++)
|
||||||
{
|
{
|
||||||
ini.Set("Hotkeys", g_HKData[i].IniText, m_LocalCoreStartupParameter.iHotkey[i]);
|
ini.Set("Hotkeys", g_HKData[i].IniText, m_LocalCoreStartupParameter.iHotkey[i]);
|
||||||
ini.Set("Hotkeys", (std::string(g_HKData[i].IniText) + "Modifier").c_str(),
|
ini.Set("Hotkeys", (std::string(g_HKData[i].IniText) + "Modifier").c_str(),
|
||||||
|
@ -236,7 +298,7 @@ void SConfig::LoadSettings()
|
||||||
ini.Get("Interface", "ShowConsole", &m_InterfaceConsole, false);
|
ini.Get("Interface", "ShowConsole", &m_InterfaceConsole, false);
|
||||||
|
|
||||||
// Hotkeys
|
// Hotkeys
|
||||||
for (int i = HK_FULLSCREEN; i < NUM_HOTKEYS; i++)
|
for (int i = 0; i < NUM_HOTKEYS; i++)
|
||||||
{
|
{
|
||||||
ini.Get("Hotkeys", g_HKData[i].IniText,
|
ini.Get("Hotkeys", g_HKData[i].IniText,
|
||||||
&m_LocalCoreStartupParameter.iHotkey[i], g_HKData[i].DefaultKey);
|
&m_LocalCoreStartupParameter.iHotkey[i], g_HKData[i].DefaultKey);
|
||||||
|
|
|
@ -22,14 +22,46 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
enum Hotkey {
|
enum Hotkey {
|
||||||
HK_FULLSCREEN,
|
HK_OPEN,
|
||||||
|
HK_CHANGE_DISC,
|
||||||
|
HK_REFRESH_LIST,
|
||||||
|
|
||||||
HK_PLAY_PAUSE,
|
HK_PLAY_PAUSE,
|
||||||
HK_STOP,
|
HK_STOP,
|
||||||
|
HK_RESET,
|
||||||
|
HK_FRAME_ADVANCE,
|
||||||
|
|
||||||
|
HK_START_RECORDING,
|
||||||
|
HK_PLAY_RECORDING,
|
||||||
|
HK_EXPORT_RECORDING,
|
||||||
|
HK_READ_ONLY_MODE,
|
||||||
|
|
||||||
|
HK_FULLSCREEN,
|
||||||
HK_SCREENSHOT,
|
HK_SCREENSHOT,
|
||||||
|
|
||||||
HK_WIIMOTE1_CONNECT,
|
HK_WIIMOTE1_CONNECT,
|
||||||
HK_WIIMOTE2_CONNECT,
|
HK_WIIMOTE2_CONNECT,
|
||||||
HK_WIIMOTE3_CONNECT,
|
HK_WIIMOTE3_CONNECT,
|
||||||
HK_WIIMOTE4_CONNECT,
|
HK_WIIMOTE4_CONNECT,
|
||||||
|
|
||||||
|
HK_LOAD_STATE_SLOT_1,
|
||||||
|
HK_LOAD_STATE_SLOT_2,
|
||||||
|
HK_LOAD_STATE_SLOT_3,
|
||||||
|
HK_LOAD_STATE_SLOT_4,
|
||||||
|
HK_LOAD_STATE_SLOT_5,
|
||||||
|
HK_LOAD_STATE_SLOT_6,
|
||||||
|
HK_LOAD_STATE_SLOT_7,
|
||||||
|
HK_LOAD_STATE_SLOT_8,
|
||||||
|
|
||||||
|
HK_SAVE_STATE_SLOT_1,
|
||||||
|
HK_SAVE_STATE_SLOT_2,
|
||||||
|
HK_SAVE_STATE_SLOT_3,
|
||||||
|
HK_SAVE_STATE_SLOT_4,
|
||||||
|
HK_SAVE_STATE_SLOT_5,
|
||||||
|
HK_SAVE_STATE_SLOT_6,
|
||||||
|
HK_SAVE_STATE_SLOT_7,
|
||||||
|
HK_SAVE_STATE_SLOT_8,
|
||||||
|
|
||||||
NUM_HOTKEYS,
|
NUM_HOTKEYS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -258,6 +258,7 @@ EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnConfigGFX)
|
||||||
EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnConfigDSP)
|
EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnConfigDSP)
|
||||||
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnConfigPAD)
|
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnConfigPAD)
|
||||||
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnConfigWiimote)
|
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnConfigWiimote)
|
||||||
|
EVT_MENU(IDM_CONFIG_HOTKEYS, CFrame::OnConfigHotkey)
|
||||||
|
|
||||||
EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnToolBar)
|
EVT_MENU(IDM_SAVE_PERSPECTIVE, CFrame::OnToolBar)
|
||||||
EVT_AUITOOLBAR_TOOL_DROPDOWN(IDM_SAVE_PERSPECTIVE, CFrame::OnDropDownToolbarItem)
|
EVT_AUITOOLBAR_TOOL_DROPDOWN(IDM_SAVE_PERSPECTIVE, CFrame::OnDropDownToolbarItem)
|
||||||
|
|
|
@ -300,6 +300,7 @@ class CFrame : public CRenderFrame
|
||||||
void OnConfigDSP(wxCommandEvent& event);
|
void OnConfigDSP(wxCommandEvent& event);
|
||||||
void OnConfigPAD(wxCommandEvent& event);
|
void OnConfigPAD(wxCommandEvent& event);
|
||||||
void OnConfigWiimote(wxCommandEvent& event);
|
void OnConfigWiimote(wxCommandEvent& event);
|
||||||
|
void OnConfigHotkey(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnToggleFullscreen(wxCommandEvent& event);
|
void OnToggleFullscreen(wxCommandEvent& event);
|
||||||
void OnToggleDualCore(wxCommandEvent& event);
|
void OnToggleDualCore(wxCommandEvent& event);
|
||||||
|
|
|
@ -68,6 +68,7 @@ Core::GetWindowHandle().
|
||||||
#include "WXInputBase.h"
|
#include "WXInputBase.h"
|
||||||
#include "WiimoteConfigDiag.h"
|
#include "WiimoteConfigDiag.h"
|
||||||
#include "InputConfigDiag.h"
|
#include "InputConfigDiag.h"
|
||||||
|
#include "HotkeyDlg.h"
|
||||||
|
|
||||||
#include <wx/datetime.h> // wxWidgets
|
#include <wx/datetime.h> // wxWidgets
|
||||||
|
|
||||||
|
@ -109,8 +110,8 @@ void CFrame::CreateMenu()
|
||||||
|
|
||||||
// file menu
|
// file menu
|
||||||
wxMenu* fileMenu = new wxMenu;
|
wxMenu* fileMenu = new wxMenu;
|
||||||
fileMenu->Append(wxID_OPEN, _("&Open...") + wxString(wxT("\tCtrl+O")));
|
fileMenu->Append(wxID_OPEN, GetMenuLabel(HK_OPEN));
|
||||||
fileMenu->Append(IDM_CHANGEDISC, _("Change &Disc..."));
|
fileMenu->Append(IDM_CHANGEDISC, GetMenuLabel(HK_CHANGE_DISC));
|
||||||
|
|
||||||
wxMenu *externalDrive = new wxMenu;
|
wxMenu *externalDrive = new wxMenu;
|
||||||
fileMenu->Append(IDM_DRIVES, _("&Boot from DVD Drive..."), externalDrive);
|
fileMenu->Append(IDM_DRIVES, _("&Boot from DVD Drive..."), externalDrive);
|
||||||
|
@ -122,7 +123,7 @@ void CFrame::CreateMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(wxID_REFRESH, _("&Refresh List"));
|
fileMenu->Append(wxID_REFRESH, GetMenuLabel(HK_REFRESH_LIST));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs..."));
|
fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs..."));
|
||||||
fileMenu->AppendSeparator();
|
fileMenu->AppendSeparator();
|
||||||
|
@ -133,18 +134,18 @@ void CFrame::CreateMenu()
|
||||||
wxMenu* emulationMenu = new wxMenu;
|
wxMenu* emulationMenu = new wxMenu;
|
||||||
emulationMenu->Append(IDM_PLAY, GetMenuLabel(HK_PLAY_PAUSE));
|
emulationMenu->Append(IDM_PLAY, GetMenuLabel(HK_PLAY_PAUSE));
|
||||||
emulationMenu->Append(IDM_STOP, GetMenuLabel(HK_STOP));
|
emulationMenu->Append(IDM_STOP, GetMenuLabel(HK_STOP));
|
||||||
emulationMenu->Append(IDM_RESET, _("&Reset"));
|
emulationMenu->Append(IDM_RESET, GetMenuLabel(HK_RESET));
|
||||||
emulationMenu->AppendSeparator();
|
emulationMenu->AppendSeparator();
|
||||||
emulationMenu->Append(IDM_TOGGLE_FULLSCREEN, GetMenuLabel(HK_FULLSCREEN));
|
emulationMenu->Append(IDM_TOGGLE_FULLSCREEN, GetMenuLabel(HK_FULLSCREEN));
|
||||||
emulationMenu->AppendSeparator();
|
emulationMenu->AppendSeparator();
|
||||||
emulationMenu->Append(IDM_RECORD, _("Start Re&cording"));
|
emulationMenu->Append(IDM_RECORD, GetMenuLabel(HK_START_RECORDING));
|
||||||
emulationMenu->Append(IDM_PLAYRECORD, _("P&lay Recording..."));
|
emulationMenu->Append(IDM_PLAYRECORD, GetMenuLabel(HK_PLAY_RECORDING));
|
||||||
emulationMenu->Append(IDM_RECORDEXPORT, _("Export Recording..."));
|
emulationMenu->Append(IDM_RECORDEXPORT, GetMenuLabel(HK_EXPORT_RECORDING));
|
||||||
emulationMenu->Append(IDM_RECORDREADONLY, _("&Read-only mode"), wxEmptyString, wxITEM_CHECK);
|
emulationMenu->Append(IDM_RECORDREADONLY, GetMenuLabel(HK_READ_ONLY_MODE), wxEmptyString, wxITEM_CHECK);
|
||||||
emulationMenu->Check(IDM_RECORDREADONLY, true);
|
emulationMenu->Check(IDM_RECORDREADONLY, true);
|
||||||
emulationMenu->AppendSeparator();
|
emulationMenu->AppendSeparator();
|
||||||
|
|
||||||
emulationMenu->Append(IDM_FRAMESTEP, _("&Frame Advance"), wxEmptyString, wxITEM_CHECK);
|
emulationMenu->Append(IDM_FRAMESTEP, GetMenuLabel(HK_FRAME_ADVANCE), wxEmptyString, wxITEM_CHECK);
|
||||||
|
|
||||||
wxMenu *skippingMenu = new wxMenu;
|
wxMenu *skippingMenu = new wxMenu;
|
||||||
emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping"));
|
emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping"));
|
||||||
|
@ -176,8 +177,8 @@ void CFrame::CreateMenu()
|
||||||
loadMenu->AppendSeparator();
|
loadMenu->AppendSeparator();
|
||||||
|
|
||||||
for (int i = 1; i <= 8; i++) {
|
for (int i = 1; i <= 8; i++) {
|
||||||
loadMenu->Append(IDM_LOADSLOT1 + i - 1, _("Slot") + wxString::Format(wxT(" %i\tF%i"), i, i));
|
loadMenu->Append(IDM_LOADSLOT1 + i - 1, GetMenuLabel(HK_LOAD_STATE_SLOT_1 + i - 1));
|
||||||
saveMenu->Append(IDM_SAVESLOT1 + i - 1, _("Slot") + wxString::Format(wxT(" %i\tShift+F%i"), i, i));
|
saveMenu->Append(IDM_SAVESLOT1 + i - 1, GetMenuLabel(HK_SAVE_STATE_SLOT_1 + i - 1));
|
||||||
}
|
}
|
||||||
m_MenuBar->Append(emulationMenu, _("&Emulation"));
|
m_MenuBar->Append(emulationMenu, _("&Emulation"));
|
||||||
|
|
||||||
|
@ -189,6 +190,7 @@ void CFrame::CreateMenu()
|
||||||
pOptionsMenu->Append(IDM_CONFIG_DSP_PLUGIN, _("&DSP Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_DSP_PLUGIN, _("&DSP Settings"));
|
||||||
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _("&Gamecube Pad Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _("&Gamecube Pad Settings"));
|
||||||
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _("&Wiimote Settings"));
|
pOptionsMenu->Append(IDM_CONFIG_WIIMOTE_PLUGIN, _("&Wiimote Settings"));
|
||||||
|
pOptionsMenu->Append(IDM_CONFIG_HOTKEYS, _("&Hotkey Settings"));
|
||||||
if (g_pCodeWindow)
|
if (g_pCodeWindow)
|
||||||
{
|
{
|
||||||
pOptionsMenu->AppendSeparator();
|
pOptionsMenu->AppendSeparator();
|
||||||
|
@ -324,9 +326,16 @@ wxString CFrame::GetMenuLabel(int Id)
|
||||||
|
|
||||||
switch (Id)
|
switch (Id)
|
||||||
{
|
{
|
||||||
case HK_FULLSCREEN:
|
case HK_OPEN:
|
||||||
Label = _("&Fullscreen");
|
Label = _("&Open...");
|
||||||
break;
|
break;
|
||||||
|
case HK_CHANGE_DISC:
|
||||||
|
Label = _("Change &Disc...");
|
||||||
|
break;
|
||||||
|
case HK_REFRESH_LIST:
|
||||||
|
Label = _("&Refresh List");
|
||||||
|
break;
|
||||||
|
|
||||||
case HK_PLAY_PAUSE:
|
case HK_PLAY_PAUSE:
|
||||||
if (Core::GetState() == Core::CORE_RUN)
|
if (Core::GetState() == Core::CORE_RUN)
|
||||||
Label = _("&Pause");
|
Label = _("&Pause");
|
||||||
|
@ -336,9 +345,33 @@ wxString CFrame::GetMenuLabel(int Id)
|
||||||
case HK_STOP:
|
case HK_STOP:
|
||||||
Label = _("&Stop");
|
Label = _("&Stop");
|
||||||
break;
|
break;
|
||||||
|
case HK_RESET:
|
||||||
|
Label = _("&Reset");
|
||||||
|
break;
|
||||||
|
case HK_FRAME_ADVANCE:
|
||||||
|
Label = _("&Frame Advance");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HK_START_RECORDING:
|
||||||
|
Label = _("Start Re&cording");
|
||||||
|
break;
|
||||||
|
case HK_PLAY_RECORDING:
|
||||||
|
Label = _("P&lay Recording...");
|
||||||
|
break;
|
||||||
|
case HK_EXPORT_RECORDING:
|
||||||
|
Label = _("Export Recording...");
|
||||||
|
break;
|
||||||
|
case HK_READ_ONLY_MODE:
|
||||||
|
Label = _("&Read-only mode");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HK_FULLSCREEN:
|
||||||
|
Label = _("&Fullscreen");
|
||||||
|
break;
|
||||||
case HK_SCREENSHOT:
|
case HK_SCREENSHOT:
|
||||||
Label = _("Take Screenshot");
|
Label = _("Take Screenshot");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_WIIMOTE1_CONNECT:
|
case HK_WIIMOTE1_CONNECT:
|
||||||
case HK_WIIMOTE2_CONNECT:
|
case HK_WIIMOTE2_CONNECT:
|
||||||
case HK_WIIMOTE3_CONNECT:
|
case HK_WIIMOTE3_CONNECT:
|
||||||
|
@ -346,6 +379,33 @@ wxString CFrame::GetMenuLabel(int Id)
|
||||||
Label = wxString::Format(_("Connect Wiimote %i"),
|
Label = wxString::Format(_("Connect Wiimote %i"),
|
||||||
Id - HK_WIIMOTE1_CONNECT + 1);
|
Id - HK_WIIMOTE1_CONNECT + 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case HK_LOAD_STATE_SLOT_1:
|
||||||
|
case HK_LOAD_STATE_SLOT_2:
|
||||||
|
case HK_LOAD_STATE_SLOT_3:
|
||||||
|
case HK_LOAD_STATE_SLOT_4:
|
||||||
|
case HK_LOAD_STATE_SLOT_5:
|
||||||
|
case HK_LOAD_STATE_SLOT_6:
|
||||||
|
case HK_LOAD_STATE_SLOT_7:
|
||||||
|
case HK_LOAD_STATE_SLOT_8:
|
||||||
|
Label = wxString::Format(_("Slot %i"),
|
||||||
|
Id - HK_LOAD_STATE_SLOT_1 + 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HK_SAVE_STATE_SLOT_1:
|
||||||
|
case HK_SAVE_STATE_SLOT_2:
|
||||||
|
case HK_SAVE_STATE_SLOT_3:
|
||||||
|
case HK_SAVE_STATE_SLOT_4:
|
||||||
|
case HK_SAVE_STATE_SLOT_5:
|
||||||
|
case HK_SAVE_STATE_SLOT_6:
|
||||||
|
case HK_SAVE_STATE_SLOT_7:
|
||||||
|
case HK_SAVE_STATE_SLOT_8:
|
||||||
|
Label = wxString::Format(_("Slot %i"),
|
||||||
|
Id - HK_SAVE_STATE_SLOT_1 + 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
Label = wxString::Format(_("Undefined %i"), Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// wxWidgets only accepts Ctrl/Alt/Shift as menu accelerator
|
// wxWidgets only accepts Ctrl/Alt/Shift as menu accelerator
|
||||||
|
@ -1158,6 +1218,15 @@ void CFrame::OnConfigWiimote(wxCommandEvent& WXUNUSED (event))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CFrame::OnConfigHotkey(wxCommandEvent& WXUNUSED (event))
|
||||||
|
{
|
||||||
|
HotkeyConfigDialog *m_HotkeyDialog = new HotkeyConfigDialog(this);
|
||||||
|
m_HotkeyDialog->ShowModal();
|
||||||
|
m_HotkeyDialog->Destroy();
|
||||||
|
// Update the GUI in case menu accelerators were changed
|
||||||
|
UpdateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
void CFrame::OnHelp(wxCommandEvent& event)
|
void CFrame::OnHelp(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
|
|
|
@ -120,6 +120,7 @@ enum
|
||||||
IDM_CONFIG_DSP_PLUGIN,
|
IDM_CONFIG_DSP_PLUGIN,
|
||||||
IDM_CONFIG_PAD_PLUGIN,
|
IDM_CONFIG_PAD_PLUGIN,
|
||||||
IDM_CONFIG_WIIMOTE_PLUGIN,
|
IDM_CONFIG_WIIMOTE_PLUGIN,
|
||||||
|
IDM_CONFIG_HOTKEYS,
|
||||||
|
|
||||||
// Views
|
// Views
|
||||||
IDM_LOGWINDOW,
|
IDM_LOGWINDOW,
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
BEGIN_EVENT_TABLE(HotkeyConfigDialog,wxDialog)
|
BEGIN_EVENT_TABLE(HotkeyConfigDialog,wxDialog)
|
||||||
EVT_CLOSE(HotkeyConfigDialog::OnClose)
|
EVT_CLOSE(HotkeyConfigDialog::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE, HotkeyConfigDialog::CloseClick)
|
EVT_BUTTON(ID_CLOSE, HotkeyConfigDialog::CloseClick)
|
||||||
EVT_COMMAND_RANGE(HK_FULLSCREEN, NUM_HOTKEYS - 1,
|
EVT_COMMAND_RANGE(0, NUM_HOTKEYS - 1,
|
||||||
wxEVT_COMMAND_BUTTON_CLICKED, HotkeyConfigDialog::OnButtonClick)
|
wxEVT_COMMAND_BUTTON_CLICKED, HotkeyConfigDialog::OnButtonClick)
|
||||||
EVT_TIMER(IDTM_BUTTON, HotkeyConfigDialog::OnButtonTimer)
|
EVT_TIMER(IDTM_BUTTON, HotkeyConfigDialog::OnButtonTimer)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
@ -188,14 +188,45 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
|
||||||
{
|
{
|
||||||
static const wxChar* hkText[] =
|
static const wxChar* hkText[] =
|
||||||
{
|
{
|
||||||
_("Toggle Fullscreen"),
|
_("Open"),
|
||||||
|
_("Change Disc"),
|
||||||
|
_("Refresh List"),
|
||||||
|
|
||||||
_("Play/Pause"),
|
_("Play/Pause"),
|
||||||
_("Stop"),
|
_("Stop"),
|
||||||
|
_("Reset"),
|
||||||
|
_("Frame Advance"),
|
||||||
|
|
||||||
|
_("Start Recording"),
|
||||||
|
_("Play Recording"),
|
||||||
|
_("Export Recording"),
|
||||||
|
_("Read-only mode"),
|
||||||
|
|
||||||
|
_("Toggle Fullscreen"),
|
||||||
_("Take Screenshot"),
|
_("Take Screenshot"),
|
||||||
|
|
||||||
_("Connect Wiimote 1"),
|
_("Connect Wiimote 1"),
|
||||||
_("Connect Wiimote 2"),
|
_("Connect Wiimote 2"),
|
||||||
_("Connect Wiimote 3"),
|
_("Connect Wiimote 3"),
|
||||||
_("Connect Wiimote 4")
|
_("Connect Wiimote 4"),
|
||||||
|
|
||||||
|
_("Load State Slot 1"),
|
||||||
|
_("Load State Slot 2"),
|
||||||
|
_("Load State Slot 3"),
|
||||||
|
_("Load State Slot 4"),
|
||||||
|
_("Load State Slot 5"),
|
||||||
|
_("Load State Slot 6"),
|
||||||
|
_("Load State Slot 7"),
|
||||||
|
_("Load State Slot 8"),
|
||||||
|
|
||||||
|
_("Save State Slot 1"),
|
||||||
|
_("Save State Slot 2"),
|
||||||
|
_("Save State Slot 3"),
|
||||||
|
_("Save State Slot 4"),
|
||||||
|
_("Save State Slot 5"),
|
||||||
|
_("Save State Slot 6"),
|
||||||
|
_("Save State Slot 7"),
|
||||||
|
_("Save State Slot 8")
|
||||||
};
|
};
|
||||||
|
|
||||||
// Configuration controls sizes
|
// Configuration controls sizes
|
||||||
|
@ -220,7 +251,7 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
|
||||||
wxStaticText *stHotkeys = new wxStaticText(this, wxID_ANY, hkText[i]);
|
wxStaticText *stHotkeys = new wxStaticText(this, wxID_ANY, hkText[i]);
|
||||||
|
|
||||||
// Key selection button
|
// Key selection button
|
||||||
m_Button_Hotkeys[i] = new wxButton(this, HK_FULLSCREEN + i, wxEmptyString,
|
m_Button_Hotkeys[i] = new wxButton(this, i, wxEmptyString,
|
||||||
wxDefaultPosition, size);
|
wxDefaultPosition, size);
|
||||||
m_Button_Hotkeys[i]->SetFont(m_SmallFont);
|
m_Button_Hotkeys[i]->SetFont(m_SmallFont);
|
||||||
SetButtonText(i,
|
SetButtonText(i,
|
||||||
|
|
Loading…
Reference in New Issue