mirror of https://github.com/PCSX2/pcsx2.git
wxgui: Begin work on some missing panels for the pcsx2 config dialog.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1628 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
c415d8d694
commit
3457347716
|
@ -161,7 +161,8 @@ struct AppImageIds
|
||||||
Plugins,
|
Plugins,
|
||||||
Speedhacks,
|
Speedhacks,
|
||||||
Gamefixes,
|
Gamefixes,
|
||||||
Video;
|
Video,
|
||||||
|
Cpu;
|
||||||
|
|
||||||
ConfigIds() :
|
ConfigIds() :
|
||||||
Paths( -1 )
|
Paths( -1 )
|
||||||
|
@ -169,6 +170,7 @@ struct AppImageIds
|
||||||
, Speedhacks( -1 )
|
, Speedhacks( -1 )
|
||||||
, Gamefixes( -1 )
|
, Gamefixes( -1 )
|
||||||
, Video( -1 )
|
, Video( -1 )
|
||||||
|
, Cpu( -1 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
} Config;
|
} Config;
|
||||||
|
|
|
@ -52,10 +52,10 @@ Dialogs::ConfigurationDialog::ConfigurationDialog( wxWindow* parent, int id ) :
|
||||||
g_ApplyState.StartBook( &m_listbook );
|
g_ApplyState.StartBook( &m_listbook );
|
||||||
|
|
||||||
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
||||||
m_listbook.AddPage( new PathsPanel( m_listbook, IdealWidth ), _("Folders"), false, cfgid.Paths );
|
m_listbook.AddPage( new CpuPanel( m_listbook, IdealWidth ), _("CPU"), false, cfgid.Cpu );
|
||||||
|
|
||||||
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
||||||
m_listbook.AddPage( new PluginSelectorPanel( m_listbook, IdealWidth ), _("Plugins"), false, cfgid.Plugins );
|
m_listbook.AddPage( new VideoPanel( m_listbook, IdealWidth ), _("GS/Video"), false, cfgid.Video );
|
||||||
|
|
||||||
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
||||||
m_listbook.AddPage( new SpeedHacksPanel( m_listbook, IdealWidth ), _("Speedhacks"), false, cfgid.Speedhacks );
|
m_listbook.AddPage( new SpeedHacksPanel( m_listbook, IdealWidth ), _("Speedhacks"), false, cfgid.Speedhacks );
|
||||||
|
@ -63,6 +63,13 @@ Dialogs::ConfigurationDialog::ConfigurationDialog( wxWindow* parent, int id ) :
|
||||||
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
||||||
m_listbook.AddPage( new GameFixesPanel( m_listbook, IdealWidth ), _("Game Fixes"), false, cfgid.Gamefixes );
|
m_listbook.AddPage( new GameFixesPanel( m_listbook, IdealWidth ), _("Game Fixes"), false, cfgid.Gamefixes );
|
||||||
|
|
||||||
|
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
||||||
|
m_listbook.AddPage( new PluginSelectorPanel( m_listbook, IdealWidth ), _("Plugins"), false, cfgid.Plugins );
|
||||||
|
|
||||||
|
g_ApplyState.SetCurrentPage( m_listbook.GetPageCount() );
|
||||||
|
m_listbook.AddPage( new PathsPanel( m_listbook, IdealWidth ), _("Folders"), false, cfgid.Paths );
|
||||||
|
|
||||||
|
|
||||||
mainSizer.Add( &m_listbook );
|
mainSizer.Add( &m_listbook );
|
||||||
AddOkCancel( mainSizer, true );
|
AddOkCancel( mainSizer, true );
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,28 @@ namespace Panels
|
||||||
void Apply( AppConfig& conf );
|
void Apply( AppConfig& conf );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
class CpuPanel : public BaseApplicableConfigPanel
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
public:
|
||||||
|
CpuPanel( wxWindow& parent, int idealWidth );
|
||||||
|
void Apply( AppConfig& conf );
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
class VideoPanel : public BaseApplicableConfigPanel
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
public:
|
||||||
|
VideoPanel( wxWindow& parent, int idealWidth );
|
||||||
|
void Apply( AppConfig& conf );
|
||||||
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
class SpeedHacksPanel : public BaseApplicableConfigPanel
|
class SpeedHacksPanel : public BaseApplicableConfigPanel
|
||||||
|
@ -328,7 +350,8 @@ namespace Panels
|
||||||
class ComboBoxPanel : public wxPanelWithHelpers
|
class ComboBoxPanel : public wxPanelWithHelpers
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
wxComboBox* m_combobox[NumPluginTypes];
|
wxComboBox* m_combobox[NumPluginTypes];
|
||||||
|
wxComboBox& m_BiosBox;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ComboBoxPanel( PluginSelectorPanel* parent );
|
ComboBoxPanel( PluginSelectorPanel* parent );
|
||||||
|
@ -356,7 +379,7 @@ namespace Panels
|
||||||
protected:
|
protected:
|
||||||
wxArrayString m_FileList; // list of potential plugin files
|
wxArrayString m_FileList; // list of potential plugin files
|
||||||
StatusPanel& m_StatusPanel;
|
StatusPanel& m_StatusPanel;
|
||||||
ComboBoxPanel& m_ComboBoxes;
|
ComboBoxPanel& m_ComponentBoxes;
|
||||||
bool m_Uninitialized;
|
bool m_Uninitialized;
|
||||||
EnumThread* m_EnumeratorThread;
|
EnumThread* m_EnumeratorThread;
|
||||||
|
|
||||||
|
|
|
@ -17,3 +17,50 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
#include "ConfigurationPanels.h"
|
||||||
|
|
||||||
|
using namespace wxHelpers;
|
||||||
|
|
||||||
|
Panels::CpuPanel::CpuPanel( wxWindow& parent, int idealWidth ) :
|
||||||
|
BaseApplicableConfigPanel( &parent, idealWidth )
|
||||||
|
{
|
||||||
|
wxFlexGridSizer& s_main = *new wxFlexGridSizer( 2 );
|
||||||
|
|
||||||
|
s_main.AddGrowableCol( 0, 1 );
|
||||||
|
s_main.AddGrowableCol( 1, 1 );
|
||||||
|
|
||||||
|
// i18n: No point in translating PS2 CPU names :)
|
||||||
|
wxStaticBoxSizer& s_ee = *new wxStaticBoxSizer( wxVERTICAL, this, L"EmotionEngine" );
|
||||||
|
wxStaticBoxSizer& s_iop = *new wxStaticBoxSizer( wxVERTICAL, this, L"IOP" );
|
||||||
|
wxStaticBoxSizer& s_vu0 = *new wxStaticBoxSizer( wxVERTICAL, this, L"VU0" );
|
||||||
|
wxStaticBoxSizer& s_vu1 = *new wxStaticBoxSizer( wxVERTICAL, this, L"VU1" );
|
||||||
|
|
||||||
|
m_StartNewRadioGroup = true;
|
||||||
|
AddRadioButton( s_ee, _("Interpreter"), wxEmptyString, _("Quite possibly the slowest thing in the universe.") );
|
||||||
|
AddRadioButton( s_ee, _("Recompiler") );
|
||||||
|
|
||||||
|
m_StartNewRadioGroup = true;
|
||||||
|
AddRadioButton( s_iop, _("Interpreter") );
|
||||||
|
AddRadioButton( s_iop, _("Recompiler") );
|
||||||
|
|
||||||
|
m_StartNewRadioGroup = true;
|
||||||
|
AddRadioButton( s_vu0, _("Interpreter") );
|
||||||
|
AddRadioButton( s_vu0, _("microVU Recompiler [new!]") );
|
||||||
|
AddRadioButton( s_vu0, _("superVU Recompiler [legacy]"), wxEmptyString, _("Useful for diagnosing possible bugs in the new mVU recompiler.") );
|
||||||
|
|
||||||
|
m_StartNewRadioGroup = true;
|
||||||
|
AddRadioButton( s_vu1, _("Interpreter") );
|
||||||
|
AddRadioButton( s_vu1, _("microVU Recompiler [new!]") );
|
||||||
|
AddRadioButton( s_vu1, _("superVU Recompiler [legacy]"), wxEmptyString, _("Useful for diagnosing possible bugs in the new mVU recompiler.") );
|
||||||
|
|
||||||
|
s_main.Add( &s_ee, SizerFlags::StdExpand() );
|
||||||
|
s_main.Add( &s_iop, SizerFlags::StdExpand() );
|
||||||
|
s_main.Add( &s_vu0, SizerFlags::StdExpand() );
|
||||||
|
s_main.Add( &s_vu1, SizerFlags::StdExpand() );
|
||||||
|
|
||||||
|
SetSizerAndFit( &s_main );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Panels::CpuPanel::Apply( AppConfig& conf )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -146,6 +146,7 @@ void Panels::PluginSelectorPanel::StatusPanel::Reset()
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
Panels::PluginSelectorPanel::ComboBoxPanel::ComboBoxPanel( PluginSelectorPanel* parent ) :
|
Panels::PluginSelectorPanel::ComboBoxPanel::ComboBoxPanel( PluginSelectorPanel* parent ) :
|
||||||
wxPanelWithHelpers( parent )
|
wxPanelWithHelpers( parent )
|
||||||
|
, m_BiosBox( *new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ) )
|
||||||
{
|
{
|
||||||
wxFlexGridSizer& s_plugin = *new wxFlexGridSizer( NumPluginTypes, 3, 16, 10 );
|
wxFlexGridSizer& s_plugin = *new wxFlexGridSizer( NumPluginTypes, 3, 16, 10 );
|
||||||
s_plugin.SetFlexibleDirection( wxHORIZONTAL );
|
s_plugin.SetFlexibleDirection( wxHORIZONTAL );
|
||||||
|
@ -164,6 +165,9 @@ Panels::PluginSelectorPanel::ComboBoxPanel::ComboBoxPanel( PluginSelectorPanel*
|
||||||
s_plugin.Add( new wxButton( this, wxID_ANY, L"Configure..." ) );
|
s_plugin.Add( new wxButton( this, wxID_ANY, L"Configure..." ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s_plugin.Add( new wxStaticText( this, wxID_ANY, L"BIOS" ), wxSizerFlags().Border( wxTOP | wxLEFT, 2 ) );
|
||||||
|
s_plugin.Add( &m_BiosBox, wxSizerFlags().Expand() );
|
||||||
|
|
||||||
SetSizerAndFit( &s_plugin );
|
SetSizerAndFit( &s_plugin );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,16 +184,16 @@ Panels::PluginSelectorPanel::PluginSelectorPanel( wxWindow& parent, int idealWid
|
||||||
, m_StatusPanel( *new StatusPanel( this,
|
, m_StatusPanel( *new StatusPanel( this,
|
||||||
wxDir::GetAllFiles( g_Conf->Folders.Plugins.ToString(), &m_FileList, wxsFormat( L"*%s", wxDynamicLibrary::GetDllExt()), wxDIR_FILES )
|
wxDir::GetAllFiles( g_Conf->Folders.Plugins.ToString(), &m_FileList, wxsFormat( L"*%s", wxDynamicLibrary::GetDllExt()), wxDIR_FILES )
|
||||||
) )
|
) )
|
||||||
, m_ComboBoxes( *new ComboBoxPanel( this ) )
|
, m_ComponentBoxes( *new ComboBoxPanel( this ) )
|
||||||
, m_Uninitialized( true )
|
, m_Uninitialized( true )
|
||||||
, m_EnumeratorThread( NULL )
|
, m_EnumeratorThread( NULL )
|
||||||
{
|
{
|
||||||
wxBoxSizer& s_main = *new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer& s_main = *new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
s_main.Add( &m_ComboBoxes, SizerFlags::StdExpand().ReserveSpaceEvenIfHidden() );
|
s_main.Add( &m_ComponentBoxes, SizerFlags::StdExpand().ReserveSpaceEvenIfHidden() );
|
||||||
|
|
||||||
s_main.AddSpacer( 4 );
|
//s_main.AddSpacer( 4 );
|
||||||
AddStaticText( s_main, _("Tip: Installed plugins that are not compatible with your hardware or operating system will be listed below a separator.") );
|
//AddStaticText( s_main, _("Tip: Installed plugins that are not compatible with your hardware or operating system will be listed below a separator.") );
|
||||||
s_main.AddSpacer( 4 );
|
s_main.AddSpacer( 4 );
|
||||||
|
|
||||||
s_main.Add( &m_StatusPanel, SizerFlags::StdExpand().ReserveSpaceEvenIfHidden() );
|
s_main.Add( &m_StatusPanel, SizerFlags::StdExpand().ReserveSpaceEvenIfHidden() );
|
||||||
|
@ -221,10 +225,10 @@ void Panels::PluginSelectorPanel::Apply( AppConfig& conf )
|
||||||
{
|
{
|
||||||
for( int i=0; i<NumPluginTypes; ++i )
|
for( int i=0; i<NumPluginTypes; ++i )
|
||||||
{
|
{
|
||||||
int sel = m_ComboBoxes.Get(i).GetSelection();
|
int sel = m_ComponentBoxes.Get(i).GetSelection();
|
||||||
if( sel == wxNOT_FOUND ) continue;
|
if( sel == wxNOT_FOUND ) continue;
|
||||||
|
|
||||||
wxFileName relative( m_FileList[(int)m_ComboBoxes.Get(i).GetClientData(sel)] );
|
wxFileName relative( m_FileList[(int)m_ComponentBoxes.Get(i).GetClientData(sel)] );
|
||||||
relative.MakeRelativeTo( g_Conf->Folders.Plugins.ToString() );
|
relative.MakeRelativeTo( g_Conf->Folders.Plugins.ToString() );
|
||||||
conf.BaseFilenames.Plugins[tbl_PluginInfo[i].id] = relative.GetFullPath();
|
conf.BaseFilenames.Plugins[tbl_PluginInfo[i].id] = relative.GetFullPath();
|
||||||
}
|
}
|
||||||
|
@ -236,7 +240,7 @@ void Panels::PluginSelectorPanel::DoRefresh()
|
||||||
|
|
||||||
// Disable all controls until enumeration is complete.
|
// Disable all controls until enumeration is complete.
|
||||||
|
|
||||||
m_ComboBoxes.Hide();
|
m_ComponentBoxes.Hide();
|
||||||
m_StatusPanel.Show();
|
m_StatusPanel.Show();
|
||||||
|
|
||||||
// Use a thread to load plugins.
|
// Use a thread to load plugins.
|
||||||
|
@ -258,7 +262,7 @@ void Panels::PluginSelectorPanel::OnShow( wxShowEvent& evt )
|
||||||
|
|
||||||
void Panels::PluginSelectorPanel::OnRefresh( wxCommandEvent& evt )
|
void Panels::PluginSelectorPanel::OnRefresh( wxCommandEvent& evt )
|
||||||
{
|
{
|
||||||
m_ComboBoxes.Reset();
|
m_ComponentBoxes.Reset();
|
||||||
DoRefresh();
|
DoRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,11 +276,11 @@ void Panels::PluginSelectorPanel::OnEnumComplete( wxCommandEvent& evt )
|
||||||
int emptyBoxes = 0;
|
int emptyBoxes = 0;
|
||||||
for( int i=0; i<NumPluginTypes; ++i )
|
for( int i=0; i<NumPluginTypes; ++i )
|
||||||
{
|
{
|
||||||
if( m_ComboBoxes.Get(i).GetCount() <= 0 )
|
if( m_ComponentBoxes.Get(i).GetCount() <= 0 )
|
||||||
emptyBoxes++;
|
emptyBoxes++;
|
||||||
|
|
||||||
else if( m_ComboBoxes.Get(i).GetSelection() == wxNOT_FOUND )
|
else if( m_ComponentBoxes.Get(i).GetSelection() == wxNOT_FOUND )
|
||||||
m_ComboBoxes.Get(i).SetSelection( 0 );
|
m_ComponentBoxes.Get(i).SetSelection( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( emptyBoxes > 0 )
|
if( emptyBoxes > 0 )
|
||||||
|
@ -288,7 +292,7 @@ void Panels::PluginSelectorPanel::OnEnumComplete( wxCommandEvent& evt )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ComboBoxes.Show();
|
m_ComponentBoxes.Show();
|
||||||
m_StatusPanel.Hide();
|
m_StatusPanel.Hide();
|
||||||
m_StatusPanel.Reset();
|
m_StatusPanel.Reset();
|
||||||
}
|
}
|
||||||
|
@ -314,7 +318,7 @@ void Panels::PluginSelectorPanel::OnProgress( wxCommandEvent& evt )
|
||||||
{
|
{
|
||||||
if( result.PassedTest & tbl_PluginInfo[i].typemask )
|
if( result.PassedTest & tbl_PluginInfo[i].typemask )
|
||||||
{
|
{
|
||||||
int sel = m_ComboBoxes.Get(i).Append( wxsFormat( L"%s %s [%s]",
|
int sel = m_ComponentBoxes.Get(i).Append( wxsFormat( L"%s %s [%s]",
|
||||||
result.Name.c_str(), result.Version[i].c_str(), Path::GetFilenameWithoutExt( m_FileList[evtidx] ).c_str() ),
|
result.Name.c_str(), result.Version[i].c_str(), Path::GetFilenameWithoutExt( m_FileList[evtidx] ).c_str() ),
|
||||||
(void*)evtidx
|
(void*)evtidx
|
||||||
);
|
);
|
||||||
|
@ -326,7 +330,7 @@ void Panels::PluginSelectorPanel::OnProgress( wxCommandEvent& evt )
|
||||||
right.MakeRelativeTo( g_Conf->Folders.Plugins.ToString() );
|
right.MakeRelativeTo( g_Conf->Folders.Plugins.ToString() );
|
||||||
|
|
||||||
if( left == right )
|
if( left == right )
|
||||||
m_ComboBoxes.Get(i).SetSelection( sel );
|
m_ComponentBoxes.Get(i).SetSelection( sel );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,3 +17,17 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
#include "ConfigurationPanels.h"
|
||||||
|
|
||||||
|
Panels::VideoPanel::VideoPanel( wxWindow& parent, int idealWidth ) :
|
||||||
|
BaseApplicableConfigPanel( &parent, idealWidth )
|
||||||
|
{
|
||||||
|
// TODO:
|
||||||
|
// Framelimiting / Frameskipping / Vsync
|
||||||
|
// GS Window Options ( incl. Fullscreen )
|
||||||
|
// MTGS Forced Synchronization
|
||||||
|
}
|
||||||
|
|
||||||
|
void Panels::VideoPanel::Apply( AppConfig& conf )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -370,6 +370,7 @@ wxImageList& Pcsx2App::GetImgList_Config()
|
||||||
FancyLoadMacro( Gamefixes );
|
FancyLoadMacro( Gamefixes );
|
||||||
FancyLoadMacro( Speedhacks );
|
FancyLoadMacro( Speedhacks );
|
||||||
FancyLoadMacro( Video );
|
FancyLoadMacro( Video );
|
||||||
|
FancyLoadMacro( Cpu );
|
||||||
}
|
}
|
||||||
m_ConfigImagesAreLoaded = true;
|
m_ConfigImagesAreLoaded = true;
|
||||||
return m_ConfigImages;
|
return m_ConfigImages;
|
||||||
|
|
Loading…
Reference in New Issue