mirror of https://github.com/PCSX2/pcsx2.git
Implemented new pxCheckBox into the rest of the gui components.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2188 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b755069217
commit
0dfa9a586e
|
@ -99,8 +99,8 @@ namespace Panels
|
|||
wxRadioButton* m_Option_None;
|
||||
wxRadioButton* m_Option_Normal;
|
||||
|
||||
wxCheckBox* m_Option_FTZ;
|
||||
wxCheckBox* m_Option_DAZ;
|
||||
pxCheckBox* m_Option_FTZ;
|
||||
pxCheckBox* m_Option_DAZ;
|
||||
|
||||
public:
|
||||
BaseAdvancedCpuOptions( wxWindow& parent, int idealWidth );
|
||||
|
@ -141,7 +141,7 @@ namespace Panels
|
|||
class FramelimiterPanel : public BaseApplicableConfigPanel
|
||||
{
|
||||
protected:
|
||||
wxCheckBox* m_check_LimiterDisable;
|
||||
pxCheckBox* m_check_LimiterDisable;
|
||||
wxSpinCtrl* m_spin_NominalPct;
|
||||
wxSpinCtrl* m_spin_SlomoPct;
|
||||
wxSpinCtrl* m_spin_TurboPct;
|
||||
|
@ -165,7 +165,7 @@ namespace Panels
|
|||
class VideoPanel : public BaseApplicableConfigPanel
|
||||
{
|
||||
protected:
|
||||
wxCheckBox* m_check_CloseGS;
|
||||
pxCheckBox* m_check_CloseGS;
|
||||
//wxCheckBox* m_check_CloseGS;
|
||||
//wxCheckBox* m_;
|
||||
|
||||
|
@ -185,11 +185,11 @@ namespace Panels
|
|||
wxStaticText* m_msg_eecycle;
|
||||
wxStaticText* m_msg_vustealer;
|
||||
|
||||
wxCheckBox* m_check_intc;
|
||||
wxCheckBox* m_check_b1fc0;
|
||||
wxCheckBox* m_check_IOPx2;
|
||||
wxCheckBox* m_check_vuFlagHack;
|
||||
wxCheckBox* m_check_vuMinMax;
|
||||
pxCheckBox* m_check_intc;
|
||||
pxCheckBox* m_check_b1fc0;
|
||||
pxCheckBox* m_check_IOPx2;
|
||||
pxCheckBox* m_check_vuFlagHack;
|
||||
pxCheckBox* m_check_vuMinMax;
|
||||
|
||||
public:
|
||||
SpeedHacksPanel( wxWindow& parent, int idealWidth );
|
||||
|
@ -209,7 +209,7 @@ namespace Panels
|
|||
class GameFixesPanel: public BaseApplicableConfigPanel
|
||||
{
|
||||
protected:
|
||||
wxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
|
||||
pxCheckBox* m_checkbox[NUM_OF_GAME_FIXES];
|
||||
|
||||
public:
|
||||
GameFixesPanel( wxWindow& parent, int idealWidth );
|
||||
|
@ -226,7 +226,7 @@ namespace Panels
|
|||
protected:
|
||||
FoldersEnum_t m_FolderId;
|
||||
wxDirPickerCtrl* m_pickerCtrl;
|
||||
wxCheckBox* m_checkCtrl;
|
||||
pxCheckBox* m_checkCtrl;
|
||||
|
||||
public:
|
||||
DirPickerPanel( wxWindow* parent, FoldersEnum_t folderid, const wxString& label, const wxString& dialogLabel );
|
||||
|
|
|
@ -24,6 +24,10 @@ Panels::BaseAdvancedCpuOptions::BaseAdvancedCpuOptions( wxWindow& parent, int id
|
|||
, s_round( *new wxStaticBoxSizer( wxVERTICAL, this, _("Round Mode") ) )
|
||||
, s_clamp( *new wxStaticBoxSizer( wxVERTICAL, this, _("Clamping Mode") ) )
|
||||
{
|
||||
|
||||
m_Option_FTZ = new pxCheckBox( this, _("Flush to Zero") );
|
||||
m_Option_DAZ = new pxCheckBox( this, _("Denormals are Zero") );
|
||||
|
||||
wxFlexGridSizer& grid = *new wxFlexGridSizer( 4 );
|
||||
|
||||
// Clever proportions selected for a fairly nice spacing, with the third
|
||||
|
@ -46,9 +50,9 @@ Panels::BaseAdvancedCpuOptions::BaseAdvancedCpuOptions( wxWindow& parent, int id
|
|||
|
||||
wxBoxSizer& s_daz( *new wxBoxSizer( wxVERTICAL ) );
|
||||
s_daz.AddSpacer( 12 );
|
||||
m_Option_FTZ = &AddCheckBox( s_daz, _("Flush to Zero") );
|
||||
s_daz.Add( m_Option_FTZ );
|
||||
s_daz.Add( m_Option_DAZ );
|
||||
s_daz.AddSpacer( 4 );
|
||||
m_Option_DAZ = &AddCheckBox( s_daz, _("Denormals are Zero") );
|
||||
s_daz.AddSpacer( 22 );
|
||||
s_daz.Add( new wxButton( this, wxID_DEFAULT, _("Restore Defaults") ), wxSizerFlags().Align( wxALIGN_CENTRE ) );
|
||||
|
||||
|
|
|
@ -67,6 +67,9 @@ Panels::DirPickerPanel::DirPickerPanel( wxWindow* parent, FoldersEnum_t folderid
|
|||
, m_pickerCtrl( NULL )
|
||||
, m_checkCtrl( NULL )
|
||||
{
|
||||
m_checkCtrl = new pxCheckBox( this, _("Use default setting") );
|
||||
|
||||
|
||||
wxStaticBoxSizer& s_box( *new wxStaticBoxSizer( wxVERTICAL, this, label ) );
|
||||
wxFlexGridSizer& s_lower( *new wxFlexGridSizer( 2, 0, 4 ) );
|
||||
|
||||
|
@ -90,8 +93,8 @@ Panels::DirPickerPanel::DirPickerPanel( wxWindow* parent, FoldersEnum_t folderid
|
|||
);
|
||||
|
||||
s_box.Add( m_pickerCtrl, wxSizerFlags().Border(wxLEFT | wxRIGHT | wxTOP, 5).Expand() );
|
||||
s_lower.Add( m_checkCtrl );
|
||||
|
||||
m_checkCtrl = &AddCheckBox( s_lower, _("Use default setting") );
|
||||
pxSetToolTip( m_checkCtrl, pxE( ".Tooltip:DirPicker:UseDefault",
|
||||
L"When checked this folder will automatically reflect the default associated with PCSX2's current usermode setting. " )
|
||||
);
|
||||
|
|
|
@ -73,7 +73,8 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
|
|||
const Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
||||
for( int i=0; i<NUM_OF_GAME_FIXES; ++i )
|
||||
{
|
||||
m_checkbox[i] = &AddCheckBox( groupSizer, check_text[i].label, wxEmptyString, check_text[i].tooltip );
|
||||
groupSizer.Add( m_checkbox[i] = new pxCheckBox( this, check_text[i].label ) );
|
||||
m_checkbox[i]->SetToolTip( check_text[i].tooltip );
|
||||
m_checkbox[i]->SetValue( !!(opts.bitset & (1 << i)) );
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,67 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
|
|||
{
|
||||
const Pcsx2Config::SpeedhackOptions& opts( g_Conf->EmuOptions.Speedhacks );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// microVU Hacks Section:
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
m_check_vuFlagHack = new pxCheckBox( this, _("mVU Flag Hack"),
|
||||
_("Large Speedup and High Compatibility; may cause garbage graphics, SPS, etc...") );
|
||||
|
||||
m_check_vuFlagHack->SetToolTip( pxE( ".Tooltips:Speedhacks:vuFlagHack",
|
||||
L"Updates Status Flags only on blocks which will read them, instead of all the time. "
|
||||
L"This is safe most of the time, and Super VU does something similar by default."
|
||||
) );
|
||||
|
||||
m_check_vuMinMax = new pxCheckBox( this, _("mVU Min/Max Hack"),
|
||||
_("Small Speedup; may cause black screens, garbage graphics, SPS, etc...") );
|
||||
|
||||
m_check_vuMinMax->SetToolTip( pxE( ".Tooltips:Speedhacks:vuMinMax",
|
||||
L"Uses SSE's Min/Max Floating Point Operations instead of custom logical Min/Max routines. "
|
||||
L"Known to break Gran Tourismo 4, Tekken 5."
|
||||
) );
|
||||
|
||||
|
||||
m_check_vuFlagHack->SetValue(opts.vuFlagHack);
|
||||
m_check_vuMinMax->SetValue(opts.vuMinMax);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// All other hacks Section:
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
m_check_intc = new pxCheckBox( this, _("Enable INTC Spin Detection"),
|
||||
_("Huge speedup for some games, with almost no compatibility side effects. [Recommended]") );
|
||||
|
||||
m_check_intc->SetToolTip( pxE( ".Tooltips:Speedhacks:INTC",
|
||||
L"This hack works best for games that use the INTC Status register to wait for vsyncs, which includes primarily non-3D "
|
||||
L"RPG titles. Games that do not use this method of vsync will see little or no speeup from this hack."
|
||||
) );
|
||||
|
||||
m_check_b1fc0 = new pxCheckBox( this, _("Enable BIFC0 Spin Detection"),
|
||||
_("Moderate speedup for some games, with no known side effects. [Recommended]" ) );
|
||||
|
||||
m_check_b1fc0->SetToolTip( pxE( ".Tooltips:Speedhacks:BIFC0",
|
||||
L"This hack works especially well for Final Fantasy X and Kingdom Hearts. BIFC0 is the address of a specific block of "
|
||||
L"code in the EE kernel that's run repeatedly when the EE is waiting for the IOP to complete a task. This hack detects "
|
||||
L"that and responds by fast-forwarding the EE until the IOP signals that the task is complete."
|
||||
) );
|
||||
|
||||
m_check_IOPx2 = new pxCheckBox( this, _("IOP x2 cycle rate hack"),
|
||||
_("Small Speedup and works well with most games; may cause some games to hang during startup.") );
|
||||
|
||||
m_check_IOPx2->SetToolTip( pxE( ".Tooltips:Speedhacks:IOPx2",
|
||||
L"Halves the cycle rate of the IOP, giving it an effective emulated speed of roughly 18 MHz. "
|
||||
L"The speedup is very minor, so this hack is generally not recommended."
|
||||
) );
|
||||
|
||||
m_check_intc->SetValue(opts.IntcStat);
|
||||
m_check_b1fc0->SetValue(opts.BIFC0);
|
||||
m_check_IOPx2->SetValue(opts.IopCycleRate_X2);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Layout Section (Sizers Bindings)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL );
|
||||
wxFlexGridSizer& cycleHacksSizer = *new wxFlexGridSizer( 2 );
|
||||
|
||||
|
@ -154,59 +215,13 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
|
|||
pxSetToolTip( m_slider_vustealer, tooltip );
|
||||
pxSetToolTip( m_msg_vustealer, tooltip );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// microVU Hacks Section:
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
m_check_vuFlagHack = &AddCheckBox(microVUSizer, _("mVU Flag Hack"),
|
||||
_("Large Speedup and High Compatibility; may cause garbage graphics, SPS, etc..."),
|
||||
pxE( ".Tooltips:Speedhacks:vuFlagHack",
|
||||
L"Updates Status Flags only on blocks which will read them, instead of all the time. "
|
||||
L"This is safe most of the time, and Super VU does something similar by default."
|
||||
) );
|
||||
microVUSizer.Add( m_check_vuFlagHack );
|
||||
microVUSizer.Add( m_check_vuMinMax );
|
||||
|
||||
m_check_vuFlagHack->SetValue(opts.vuFlagHack);
|
||||
|
||||
m_check_vuMinMax = &AddCheckBox(microVUSizer, _("mVU Min/Max Hack"),
|
||||
_("Small Speedup; may cause black screens, garbage graphics, SPS, etc..."),
|
||||
pxE( ".Tooltips:Speedhacks:vuMinMax",
|
||||
L"Uses SSE's Min/Max Floating Point Operations instead of custom logical Min/Max routines. "
|
||||
L"Known to break Gran Tourismo 4, Tekken 5."
|
||||
) );
|
||||
|
||||
m_check_vuMinMax->SetValue(opts.vuMinMax);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// All other hacks Section:
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
m_check_intc = &AddCheckBox(miscSizer, _("Enable INTC Spin Detection"),
|
||||
_("Huge speedup for some games, with almost no compatibility side effects. [Recommended]"),
|
||||
pxE( ".Tooltips:Speedhacks:INTC",
|
||||
L"This hack works best for games that use the INTC Status register to wait for vsyncs, which includes primarily non-3D "
|
||||
L"RPG titles. Games that do not use this method of vsync will see little or no speeup from this hack."
|
||||
) );
|
||||
|
||||
m_check_intc->SetValue(opts.IntcStat);
|
||||
|
||||
m_check_b1fc0 = &AddCheckBox(miscSizer, _("Enable BIFC0 Spin Detection"),
|
||||
_("Moderate speedup for some games, with no known side effects. [Recommended]" ),
|
||||
pxE( ".Tooltips:Speedhacks:BIFC0",
|
||||
L"This hack works especially well for Final Fantasy X and Kingdom Hearts. BIFC0 is the address of a specific block of "
|
||||
L"code in the EE kernel that's run repeatedly when the EE is waiting for the IOP to complete a task. This hack detects "
|
||||
L"that and responds by fast-forwarding the EE until the IOP signals that the task is complete."
|
||||
) );
|
||||
|
||||
m_check_b1fc0->SetValue(opts.BIFC0);
|
||||
|
||||
m_check_IOPx2 = &AddCheckBox(miscSizer, _("IOP x2 cycle rate hack"),
|
||||
_("Small Speedup and works well with most games; may cause some games to hang during startup."),
|
||||
pxE( ".Tooltips:Speedhacks:IOPx2",
|
||||
L"Halves the cycle rate of the IOP, giving it an effective emulated speed of roughly 18 MHz. "
|
||||
L"The speedup is very minor, so this hack is generally not recommended."
|
||||
) );
|
||||
|
||||
m_check_IOPx2->SetValue(opts.IopCycleRate_X2);
|
||||
miscSizer.Add( m_check_intc );
|
||||
miscSizer.Add( m_check_b1fc0 );
|
||||
miscSizer.Add( m_check_IOPx2 );
|
||||
|
||||
cycleHacksSizer.Add( &cyclerateSizer, SizerFlags::TopLevelBox() );
|
||||
cycleHacksSizer.Add( &stealerSizer, SizerFlags::TopLevelBox() );
|
||||
|
|
|
@ -25,18 +25,20 @@ Panels::FramelimiterPanel::FramelimiterPanel( wxWindow& parent, int idealWidth )
|
|||
{
|
||||
wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_check_LimiterDisable = new pxCheckBox( this, _("Disable Framelimiting"),
|
||||
_("Useful for running benchmarks. Toggle this option in-game by pressing F4.") );
|
||||
|
||||
m_check_LimiterDisable->SetToolTip( pxE( ".Tooltip:Framelimiter:Disable",
|
||||
L"Note that when Framelimiting is disabled, Turbo and SlowMotion modes will not "
|
||||
L"be available either."
|
||||
) );
|
||||
|
||||
AddStaticText( mainSizer, pxE( ".Framelimiter:Heading",
|
||||
L"The internal framelimiter regulates the speed of the virtual machine. Adjustment values below are in "
|
||||
L"percentages of the default region-based framerate, which can also be configured below."
|
||||
) );
|
||||
|
||||
m_check_LimiterDisable = &AddCheckBox( mainSizer, _("Disable Framelimiting"),
|
||||
_("Useful for running benchmarks. Toggle this option in-game by pressing F4."),
|
||||
pxE( ".Tooltip:Framelimiter:Disable",
|
||||
L"Note that when Framelimiting is disabled, Turbo and SlowMotion modes will not "
|
||||
L"be available either."
|
||||
)
|
||||
);
|
||||
mainSizer.Add( m_check_LimiterDisable );
|
||||
|
||||
m_spin_NominalPct = new wxSpinCtrl( this );
|
||||
m_spin_SlomoPct = new wxSpinCtrl( this );
|
||||
|
@ -107,15 +109,12 @@ void Panels::FramelimiterPanel::Apply()
|
|||
Panels::VideoPanel::VideoPanel( wxWindow& parent, int idealWidth ) :
|
||||
BaseApplicableConfigPanel( &parent, idealWidth )
|
||||
{
|
||||
wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_check_CloseGS = &AddCheckBox( mainSizer, _("Hide GS window on Suspend"),
|
||||
wxEmptyString, // subtext
|
||||
pxE( ".Tooltip:Video:HideGS",
|
||||
L"Completely closes the often large and bulky GS window when pressing "
|
||||
L"ESC or suspending the emulator. That way it won't get *in* the way!"
|
||||
)
|
||||
);
|
||||
m_check_CloseGS = new pxCheckBox( this, _("Hide GS window on Suspend") );
|
||||
|
||||
m_check_CloseGS->SetToolTip( pxE( ".Tooltip:Video:HideGS",
|
||||
L"Completely closes the often large and bulky GS window when pressing "
|
||||
L"ESC or suspending the emulator. That way it won't get *in* the way!"
|
||||
) );
|
||||
|
||||
/*&AddCheckBox( mainSizer, _(""),
|
||||
wxEmptyString, // subtext
|
||||
|
@ -127,10 +126,12 @@ Panels::VideoPanel::VideoPanel( wxWindow& parent, int idealWidth ) :
|
|||
|
||||
m_check_CloseGS->SetValue( g_Conf->CloseGSonEsc );
|
||||
|
||||
wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL );
|
||||
wxStaticBoxSizer& limitSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Framelimiter") );
|
||||
|
||||
limitSizer.Add( new FramelimiterPanel( *this, idealWidth - 32 ) );
|
||||
|
||||
mainSizer.Add( m_check_CloseGS );
|
||||
mainSizer.Add( &limitSizer );
|
||||
|
||||
SetSizer( &mainSizer );
|
||||
|
|
|
@ -335,10 +335,10 @@ wxPanelWithHelpers::wxPanelWithHelpers( wxWindow* parent, const wxPoint& pos, co
|
|||
//
|
||||
// Static subtext, if specified, is displayed below the checkbox and is indented accordingly.
|
||||
//
|
||||
wxCheckBox& wxPanelWithHelpers::AddCheckBox( wxSizer& sizer, const wxString& label, const wxString& subtext, const wxString& tooltip )
|
||||
/*wxCheckBox& wxPanelWithHelpers::AddCheckBox( wxSizer& sizer, const wxString& label, const wxString& subtext, const wxString& tooltip )
|
||||
{
|
||||
return wxHelpers::AddCheckBoxTo( this, sizer, label, subtext, tooltip, GetIdealWidth()-8 );
|
||||
}
|
||||
}*/
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Creates a static text box that generally "makes sense" in a free-flowing layout. Specifically, this
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
//wxRadioButton& NewSpinCtrl( const wxString& label, const wxString& subtext=wxEmptyString, const wxString& tooltip=wxEmptyString );
|
||||
|
||||
wxCheckBox& AddCheckBox( wxSizer& sizer, const wxString& label, const wxString& subtext=wxEmptyString, const wxString& tooltip=wxEmptyString );
|
||||
//wxCheckBox& AddCheckBox( wxSizer& sizer, const wxString& label, const wxString& subtext=wxEmptyString, const wxString& tooltip=wxEmptyString );
|
||||
wxRadioButton& AddRadioButton( wxSizer& sizer, const wxString& label, const wxString& subtext=wxEmptyString, const wxString& tooltip=wxEmptyString );
|
||||
wxStaticText& AddStaticText(wxSizer& sizer, const wxString& label, int alignFlags=wxALIGN_CENTRE, int size=wxDefaultCoord );
|
||||
|
||||
|
@ -114,6 +114,7 @@ public:
|
|||
pxCheckBox& SetToolTip( const wxString& tip );
|
||||
pxCheckBox& SetValue( bool val );
|
||||
bool GetValue() const;
|
||||
bool IsChecked() const { pxAssert( m_checkbox != NULL ); return m_checkbox->IsChecked(); }
|
||||
|
||||
operator wxCheckBox&() { pxAssert( m_checkbox != NULL ); return *m_checkbox; }
|
||||
operator const wxCheckBox&() const { pxAssert( m_checkbox != NULL ); return *m_checkbox; }
|
||||
|
|
Loading…
Reference in New Issue