mirror of https://github.com/PCSX2/pcsx2.git
wxgui: Get the savestate menus ready to be hooked up.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1753 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
66507e2303
commit
66f24c0bea
|
@ -26,27 +26,17 @@
|
|||
#include "svnrev.h"
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/*wxMenu* MainEmuFrame::MakeStatesMenu()
|
||||
{
|
||||
wxMenu* mnuStates = new wxMenu();
|
||||
|
||||
mnuStates->Append( Menu_State_Load, _("Load"), &m_LoadStatesSubmenu, wxEmptyString );
|
||||
mnuStates->Append( Menu_State_Save, _("Save"), &m_SaveStatesSubmenu, wxEmptyString );
|
||||
return mnuStates;
|
||||
}*/
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid ) const
|
||||
{
|
||||
wxMenu* mnuSubstates = new wxMenu();
|
||||
|
||||
mnuSubstates->Append( baseid+1, _("Slot 0") );
|
||||
mnuSubstates->Append( baseid+2, _("Slot 1") );
|
||||
mnuSubstates->Append( baseid+3, _("Slot 2") );
|
||||
mnuSubstates->Append( baseid+4, _("Slot 3") );
|
||||
mnuSubstates->Append( baseid+5, _("Slot 4") );
|
||||
mnuSubstates->Append( baseid, _("Other...") );
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
mnuSubstates->Append( baseid+i+1, wxsFormat(L"Slot %d", i) );
|
||||
}
|
||||
mnuSubstates->AppendSeparator();
|
||||
mnuSubstates->Append( baseid - 1, _("Other...") );
|
||||
return mnuSubstates;
|
||||
}
|
||||
|
||||
|
@ -205,6 +195,15 @@ void MainEmuFrame::ConnectMenus()
|
|||
ConnectMenu( MenuId_Emu_Reset, Menu_EmuReset_Click );
|
||||
|
||||
ConnectMenu( MenuId_State_LoadOther, Menu_LoadStateOther_Click );
|
||||
|
||||
for (int i = MenuId_State_Load01 + 1; i <= (MenuId_State_Load01 + 10); i++)
|
||||
ConnectMenu(i, Menu_LoadStates_Click);
|
||||
|
||||
ConnectMenu( MenuId_State_SaveOther, Menu_SaveStateOther_Click );
|
||||
|
||||
for (int i = MenuId_State_Save01 + 1; i <= (MenuId_State_Save01 + 10); i++)
|
||||
ConnectMenu(i, Menu_SaveStates_Click);
|
||||
|
||||
ConnectMenu( MenuId_State_SaveOther, Menu_SaveStateOther_Click );
|
||||
|
||||
ConnectMenu( MenuId_Debug_Open, Menu_Debug_Open_Click );
|
||||
|
|
|
@ -83,6 +83,8 @@ protected:
|
|||
void Menu_BootCdvd_Click(wxCommandEvent &event);
|
||||
void Menu_OpenELF_Click(wxCommandEvent &event);
|
||||
void Menu_CdvdSource_Click(wxCommandEvent &event);
|
||||
void Menu_LoadStates_Click(wxCommandEvent &event);
|
||||
void Menu_SaveStates_Click(wxCommandEvent &event);
|
||||
void Menu_LoadStateOther_Click(wxCommandEvent &event);
|
||||
void Menu_SaveStateOther_Click(wxCommandEvent &event);
|
||||
void Menu_Exit_Click(wxCommandEvent &event);
|
||||
|
|
|
@ -188,12 +188,36 @@ void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent &event)
|
|||
{
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_LoadStates_Click(wxCommandEvent &event)
|
||||
{
|
||||
int id = event.GetId() - MenuId_State_Load01 - 1;
|
||||
if (id == -1) // Bad, I know. If I figure out why Load Other... gets connected here, I'll remove it.
|
||||
{
|
||||
Menu_LoadStateOther_Click(event);
|
||||
return;
|
||||
}
|
||||
Console::WriteLn("If this were hooked up, it would load slot %d.", params id);
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_SaveStates_Click(wxCommandEvent &event)
|
||||
{
|
||||
int id = event.GetId() - MenuId_State_Save01 - 1;
|
||||
if (id == -1)
|
||||
{
|
||||
Menu_SaveStateOther_Click(event);
|
||||
return;
|
||||
}
|
||||
Console::WriteLn("If this were hooked up, it would save slot %d.", params id);
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_LoadStateOther_Click(wxCommandEvent &event)
|
||||
{
|
||||
Console::WriteLn("If this were hooked up, it would load a savestate file.");
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_SaveStateOther_Click(wxCommandEvent &event)
|
||||
{
|
||||
Console::WriteLn("If this were hooked up, it would save a savestate file.");
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_Exit_Click(wxCommandEvent &event)
|
||||
|
|
Loading…
Reference in New Issue