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:
arcum42 2009-09-06 08:37:52 +00:00
parent 66507e2303
commit 66f24c0bea
3 changed files with 48 additions and 23 deletions

View File

@ -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 );

View File

@ -29,7 +29,7 @@ class MainEmuFrame: public wxFrame
// ------------------------------------------------------------------------
// MainEmuFrame Protected Variables
// ------------------------------------------------------------------------
protected:
wxFileHistory* m_RecentIsoList;
wxStatusBar& m_statusbar;
@ -66,7 +66,7 @@ public:
void UpdateIsoSrcFile();
void UpdateIsoSrcSelection();
void ApplySettings();
protected:
void InitLogBoxPosition( AppConfig::ConsoleLogOptions& conf );
@ -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);

View File

@ -51,7 +51,7 @@ void MainEmuFrame::Menu_CdvdSource_Click( wxCommandEvent &event )
case MenuId_Src_Iso: g_Conf->CdvdSource = CDVDsrc_Iso; break;
case MenuId_Src_Plugin: g_Conf->CdvdSource = CDVDsrc_Plugin; break;
case MenuId_Src_NoDisc: g_Conf->CdvdSource = CDVDsrc_NoDisc; break;
jNO_DEFAULT
}
UpdateIsoSrcSelection();
@ -119,7 +119,7 @@ void MainEmuFrame::Menu_RunIso_Click( wxCommandEvent &event )
SysResume();
return;
}
SysEndExecution();
g_Conf->Folders.RunIso = wxFileName( ctrl.GetPath() ).GetPath();
@ -148,7 +148,7 @@ void MainEmuFrame::Menu_RunIso_Click( wxCommandEvent &event )
// PS2 game. Valid!
elf_file = ename;
break;
jNO_DEFAULT
}
}
@ -187,13 +187,37 @@ void MainEmuFrame::Menu_IsoRecent_Click(wxCommandEvent &event)
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)