mirror of https://github.com/PCSX2/pcsx2.git
wxGui: Start work on a Speed Hack dialog. Update the Game Hack dialog.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1082 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
04beb1f29f
commit
ab104520d7
|
@ -17,6 +17,9 @@
|
|||
<Compiler>
|
||||
<Add option="-g" />
|
||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" />
|
||||
<Add option="-Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable" />
|
||||
<Add option="-pipe -msse -msse2" />
|
||||
<Add option="-fno-guess-branch-probability -fno-dse -fno-tree-dse" />
|
||||
<Add option="-DPCSX2_DEVBUILD" />
|
||||
<Add option="-D_DEBUG" />
|
||||
</Compiler>
|
||||
|
@ -39,6 +42,9 @@
|
|||
<Add option="-O2" />
|
||||
<Add option="-W" />
|
||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=yes --cflags`" />
|
||||
<Add option="-Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable" />
|
||||
<Add option="-pipe -msse -msse2" />
|
||||
<Add option="-fno-guess-branch-probability -fno-dse -fno-tree-dse" />
|
||||
<Add option="-DNDEBUG" />
|
||||
<Add option="-DPCSX2_DEVBUILD" />
|
||||
</Compiler>
|
||||
|
@ -60,6 +66,9 @@
|
|||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
<Add option="`wx-config --version=2.8 --static=no --unicode=yes --debug=no --cflags`" />
|
||||
<Add option="-Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable" />
|
||||
<Add option="-pipe -msse -msse2" />
|
||||
<Add option="-fno-guess-branch-probability -fno-dse -fno-tree-dse" />
|
||||
<Add option="-DNDEBUG" />
|
||||
</Compiler>
|
||||
<ResourceCompiler>
|
||||
|
@ -78,8 +87,6 @@
|
|||
</Environment>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-march=athlon" />
|
||||
<Add option="-march=pentium4" />
|
||||
<Add option="-fno-guess-branch-probability" />
|
||||
<Add option="-fno-dse -fno-tree-dse" />
|
||||
<Add option="-DWX_PRECOMP" />
|
||||
|
@ -204,6 +211,8 @@
|
|||
<Unit filename="../NewGUI/LogOptionsDialog.h" />
|
||||
<Unit filename="../NewGUI/MainFrame.cpp" />
|
||||
<Unit filename="../NewGUI/MainFrame.h" />
|
||||
<Unit filename="../NewGUI/SpeedHacksDialog.cpp" />
|
||||
<Unit filename="../NewGUI/SpeedHacksDialog.h" />
|
||||
<Unit filename="../NewGUI/main.cpp" />
|
||||
<Unit filename="../NewGUI/wxHelpers.cpp" />
|
||||
<Unit filename="../NewGUI/wxHelpers.h" />
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include "Misc.h"
|
||||
#include "GameFixesDialog.h"
|
||||
#include "System.h"
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
|
@ -35,6 +36,7 @@ GameFixesDialog::GameFixesDialog( wxWindow* parent, int id ):
|
|||
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
|
||||
|
||||
AddCheckBox( groupSizer, _T("FPU Compare Hack - Special fix for Digimon Rumble Arena 2.") );
|
||||
AddCheckBox( groupSizer, _T("FPU Multiply Hack - Special fix for Tales of Destiny.") );
|
||||
AddCheckBox( groupSizer, _T("VU Add / Sub Hack - Special fix for Tri-Ace games!") );
|
||||
AddCheckBox( groupSizer, _T("VU Clip Hack - Special fix for God of War") );
|
||||
|
||||
|
@ -45,33 +47,35 @@ GameFixesDialog::GameFixesDialog( wxWindow* parent, int id ):
|
|||
SetSizerAndFit( &mainSizer );
|
||||
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::FPUCompareHack_Click ) );
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::FPUMultHack_Click ) );
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::TriAce_Click ) );
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GameFixesDialog::GodWar_Click ) );
|
||||
}
|
||||
|
||||
/*
|
||||
BEGIN_EVENT_TABLE(GameFixesDialog, wxDialog)
|
||||
EVT_CHECKBOX(wxID_ANY, FPUCompareHack_Click)
|
||||
EVT_CHECKBOX(wxID_ANY, TriAce_Click)
|
||||
EVT_CHECKBOX(wxID_ANY, GodWar_Click)
|
||||
END_EVENT_TABLE();
|
||||
*/
|
||||
}
|
||||
|
||||
void GameFixesDialog::FPUCompareHack_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.GameFixes |= is_checked ? FLAG_FPU_Compare : 0;
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void GameFixesDialog::FPUMultHack_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.GameFixes |= is_checked ? FLAG_FPU_MUL : 0;
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void GameFixesDialog::TriAce_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.GameFixes |= is_checked ? FLAG_VU_ADD_SUB : 0;
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void GameFixesDialog::GodWar_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.GameFixes |= is_checked ? FLAG_VU_CLIP : 0;
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
} // end namespace Dialogs
|
||||
} // end namespace Dialogs
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
|
||||
#include "wxHelpers.h"
|
||||
|
||||
#define FLAG_VU_ADD_SUB 0x1 //Tri-Ace - IDC_GAMEFIX2
|
||||
#define FLAG_VU_CLIP 0x2 // Persona3/4 - IDC_GAMEFIX4
|
||||
#define FLAG_FPU_Compare 0x4 // Digimon Rumble Arena - IDC_GAMEFIX3
|
||||
#define FLAG_FPU_MUL 0x8 //Tales of Destiny - IDC_GAMEFIX5
|
||||
|
||||
namespace Dialogs
|
||||
{
|
||||
class GameFixesDialog: public wxDialogWithHelpers
|
||||
|
@ -31,10 +36,10 @@ namespace Dialogs
|
|||
GameFixesDialog(wxWindow* parent, int id);
|
||||
|
||||
protected:
|
||||
//DECLARE_EVENT_TABLE();
|
||||
|
||||
public:
|
||||
void FPUCompareHack_Click(wxCommandEvent &event);
|
||||
void FPUMultHack_Click(wxCommandEvent &event);
|
||||
void TriAce_Click(wxCommandEvent &event);
|
||||
void GodWar_Click(wxCommandEvent &event);
|
||||
void Ok_Click(wxCommandEvent &event);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include "MainFrame.h"
|
||||
#include "GameFixesDialog.h"
|
||||
#include "SpeedHacksDialog.h"
|
||||
#include "LogOptionsDialog.h"
|
||||
#include "AboutBoxDialog.h"
|
||||
|
||||
|
@ -32,7 +33,7 @@ using namespace Dialogs;
|
|||
wxMenu* MainEmuFrame::MakeLanguagesMenu() const
|
||||
{
|
||||
wxMenu* menuLangs = new wxMenu();
|
||||
|
||||
|
||||
// TODO : Index languages out of the resources and Langs folder.
|
||||
|
||||
menuLangs->Append(Menu_Language_Start, _T("English"), wxEmptyString, wxITEM_RADIO);
|
||||
|
@ -71,7 +72,7 @@ void MainEmuFrame::PopulateVideoMenu()
|
|||
m_menuVideo.AppendSeparator();
|
||||
|
||||
// Populate options from the plugin here.
|
||||
|
||||
|
||||
m_menuVideo.Append( Menu_Video_Advanced, _T("Advanced..."), wxEmptyString, wxITEM_NORMAL );
|
||||
}
|
||||
|
||||
|
@ -105,29 +106,31 @@ void MainEmuFrame::ConnectMenus()
|
|||
Connect( wxEVT_MOVE, wxMoveEventHandler(MainEmuFrame::OnMoveAround) );
|
||||
|
||||
// This just seems a bit more flexible & intuitive to me, if overly verbose.
|
||||
|
||||
|
||||
ConnectMenu( Menu_QuickBootCD, Menu_QuickBootCD_Click );
|
||||
ConnectMenu( Menu_FullBootCD, Menu_BootCD_Click );
|
||||
ConnectMenu( Menu_BootNoCD, Menu_BootNoCD_Click );
|
||||
|
||||
|
||||
ConnectMenu( Menu_RunELF, Menu_OpenELF_Click );
|
||||
ConnectMenu( Menu_Run_Exit, Menu_Exit_Click );
|
||||
|
||||
|
||||
ConnectMenu( Menu_SuspendExec, Menu_Suspend_Click );
|
||||
ConnectMenu( Menu_ResumeExec, Menu_Resume_Click );
|
||||
ConnectMenu( Menu_Reset, Menu_Reset_Click );
|
||||
|
||||
|
||||
ConnectMenu( Menu_State_LoadOther, Menu_LoadStateOther_Click );
|
||||
ConnectMenu( Menu_State_SaveOther, Menu_SaveStateOther_Click );
|
||||
|
||||
|
||||
ConnectMenu( Menu_Config_Gamefixes, Menu_Gamefixes_Click );
|
||||
|
||||
ConnectMenu( Menu_Config_SpeedHacks, Menu_Speedhacks_Click );
|
||||
|
||||
|
||||
ConnectMenu( Menu_Debug_Open, Menu_Debug_Open_Click );
|
||||
ConnectMenu( Menu_Debug_MemoryDump, Menu_Debug_MemoryDump_Click );
|
||||
ConnectMenu( Menu_Debug_Logging, Menu_Debug_Logging_Click );
|
||||
|
||||
|
||||
ConnectMenu( Menu_Console, Menu_ShowConsole );
|
||||
|
||||
|
||||
ConnectMenu( Menu_About, Menu_ShowAboutBox );
|
||||
}
|
||||
|
||||
|
@ -157,10 +160,10 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons
|
|||
m_menuAudio( *new wxMenu() ),
|
||||
m_menuPad( *new wxMenu() ),
|
||||
m_menuDebug( *new wxMenu() ),
|
||||
|
||||
|
||||
m_LoadStatesSubmenu( *MakeStatesSubMenu( Menu_State_Load01 ) ),
|
||||
m_SaveStatesSubmenu( *MakeStatesSubMenu( Menu_State_Save01 ) ),
|
||||
|
||||
|
||||
m_MenuItem_Console( *new wxMenuItem( &m_menuMisc, Menu_Console, L"Show Console", wxEmptyString, wxITEM_CHECK ) )
|
||||
{
|
||||
|
||||
|
@ -197,7 +200,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons
|
|||
wxBoxSizer& joe( *new wxBoxSizer( wxVERTICAL ) );
|
||||
joe.Add( &m_background );
|
||||
SetSizerAndFit( &joe );
|
||||
|
||||
|
||||
// Valid zone for window positioning.
|
||||
// Top/Left boundaries are fairly strict, since any more offscreen and the window titlebar
|
||||
// would be obscured from being grabbable.
|
||||
|
@ -233,7 +236,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons
|
|||
m_logbox.Show( g_Conf.ConLogBox.Visible );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
|
||||
m_menuRun.Append(Menu_QuickBootCD, _T("Boot CDVD (Quick)"), wxEmptyString, wxITEM_NORMAL);
|
||||
m_menuRun.Append(Menu_FullBootCD, _T("Boot CDVD (Full)"), wxEmptyString, wxITEM_NORMAL);
|
||||
m_menuRun.Append(Menu_BootNoCD, _T("Boot without CDVD"), wxEmptyString, wxITEM_NORMAL);
|
||||
|
@ -295,7 +298,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, int id, const wxString& title, cons
|
|||
m_menuDebug.Append(Menu_Debug_Logging, _T("Logging..."), wxEmptyString, wxITEM_NORMAL);
|
||||
|
||||
ConnectMenus();
|
||||
|
||||
|
||||
m_MenuItem_Console.Check( g_Conf.ConLogBox.Visible );
|
||||
}
|
||||
|
||||
|
@ -346,6 +349,11 @@ void MainEmuFrame::Menu_Gamefixes_Click( wxCommandEvent& event )
|
|||
GameFixesDialog( this, wxID_ANY ).ShowModal();
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_Speedhacks_Click( wxCommandEvent& event )
|
||||
{
|
||||
SpeedHacksDialog( this, wxID_ANY ).ShowModal();
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_Debug_Open_Click(wxCommandEvent &event)
|
||||
{
|
||||
}
|
||||
|
@ -367,4 +375,4 @@ void MainEmuFrame::Menu_ShowConsole(wxCommandEvent &event)
|
|||
void MainEmuFrame::Menu_ShowAboutBox(wxCommandEvent &event)
|
||||
{
|
||||
AboutBoxDialog( this, wxID_ANY ).ShowModal();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
@ -36,7 +36,7 @@ protected:
|
|||
|
||||
enum Identifiers
|
||||
{
|
||||
// Main Menu Section
|
||||
// Main Menu Section
|
||||
Menu_Run = 1,
|
||||
Menu_Config, // General config, plus non audio/video plugins.
|
||||
Menu_Video, // Video options filled in by GS plugin
|
||||
|
@ -101,13 +101,13 @@ protected:
|
|||
Menu_Profiler, // Enable profiler
|
||||
Menu_Console, // Enable console
|
||||
Menu_Patches,
|
||||
|
||||
|
||||
// Debug Subsection
|
||||
Menu_Debug_Open = 600, // opens the debugger window / starts a debug session
|
||||
Menu_Debug_MemoryDump,
|
||||
Menu_Debug_Logging, // dialog for selection additional log options
|
||||
Menu_Languages,
|
||||
|
||||
|
||||
// Language Menu
|
||||
// (Updated entirely dynamically, all values from range 1000 onward are reserved for languages)
|
||||
Menu_Language_Start = 1000
|
||||
|
@ -116,7 +116,7 @@ protected:
|
|||
wxMenu* MakeStatesSubMenu( int baseid ) const;
|
||||
wxMenu* MakeStatesMenu();
|
||||
wxMenu* MakeLanguagesMenu() const;
|
||||
|
||||
|
||||
void PopulateVideoMenu();
|
||||
void PopulateAudioMenu();
|
||||
void PopulatePadMenu();
|
||||
|
@ -140,12 +140,12 @@ protected:
|
|||
|
||||
wxMenu& m_LoadStatesSubmenu;
|
||||
wxMenu& m_SaveStatesSubmenu;
|
||||
|
||||
|
||||
wxMenuItem& m_MenuItem_Console;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Menu Options for the Main Window! :D
|
||||
|
||||
|
||||
protected:
|
||||
void OnMoveAround( wxMoveEvent& evt );
|
||||
|
||||
|
@ -163,11 +163,12 @@ protected:
|
|||
void Menu_Reset_Click(wxCommandEvent &event);
|
||||
|
||||
void Menu_Gamefixes_Click( wxCommandEvent& event );
|
||||
void Menu_Speedhacks_Click( wxCommandEvent& event );
|
||||
|
||||
void Menu_Debug_Open_Click(wxCommandEvent &event);
|
||||
void Menu_Debug_MemoryDump_Click(wxCommandEvent &event);
|
||||
void Menu_Debug_Logging_Click(wxCommandEvent &event);
|
||||
|
||||
|
||||
void Menu_ShowConsole(wxCommandEvent &event);
|
||||
void Menu_ShowAboutBox(wxCommandEvent &event);
|
||||
};
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "Misc.h"
|
||||
#include "SpeedHacksDialog.h"
|
||||
#include "System.h"
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
namespace Dialogs {
|
||||
|
||||
SpeedHacksDialog::SpeedHacksDialog( wxWindow* parent, int id ):
|
||||
wxDialogWithHelpers( parent, id, _T("Speed Hacks"), true )
|
||||
{
|
||||
wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL );
|
||||
wxBoxSizer& secondarySizer = *new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer& sliderSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Cycle Hacks") );
|
||||
wxStaticBoxSizer& miscSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Misc Speed Hacks") );
|
||||
|
||||
AddStaticText(mainSizer, _T("These hacks will affect the speed of PCSX2, but compromise compatability."));
|
||||
AddStaticText(mainSizer, _T("If you have issues, disable all of these and try again."));
|
||||
|
||||
wxSlider* vuScale = new wxSlider(this, wxID_ANY, Config.Hacks.VUCycleSteal, 0, 4 );
|
||||
wxSlider* eeScale = new wxSlider(this, wxID_ANY, Config.Hacks.EECycleRate, 0, 2);
|
||||
|
||||
AddStaticText(sliderSizer, _T("EE Cycle"));
|
||||
sliderSizer.Add( eeScale, wxEXPAND );
|
||||
AddStaticText(sliderSizer, _T("Placeholder text for EE scale position."));
|
||||
|
||||
AddStaticText(sliderSizer, _T("VU Cycle"));
|
||||
sliderSizer.Add( vuScale, wxEXPAND );
|
||||
AddStaticText(sliderSizer, _T("Placeholder text for VU scale position."));
|
||||
|
||||
|
||||
AddCheckBox(miscSizer, _T("Enable IOP x2 Cycle rate"));
|
||||
AddStaticText(miscSizer, _T(" Small Speedup, and works well with most games."), 400);
|
||||
|
||||
AddCheckBox(miscSizer, _T("WaitCycles Sync Hack") );
|
||||
AddStaticText(miscSizer, _T(" Small Speedup. Works well with most games, but it may cause certain games to crash, or freeze up during bootup or stage changes."), 400);
|
||||
|
||||
AddCheckBox(miscSizer, _T("INTC Sync Hack") );
|
||||
AddStaticText(miscSizer, _T(" Huge speedup in many games, and a pretty high compatability rate (some games still work better with EE sync hacks)."), 400);
|
||||
|
||||
AddCheckBox(miscSizer, _T("Idle Loop Fast-Forward (experimental)") );
|
||||
AddStaticText(miscSizer, _T(" Speedup for a few games, including FFX with no known side effects. More later."), 400);
|
||||
|
||||
secondarySizer.Add( &sliderSizer, wxEXPAND );
|
||||
secondarySizer.Add( &miscSizer, wxEXPAND );
|
||||
mainSizer.Add( &secondarySizer, stdCenteredFlags );
|
||||
|
||||
AddOkCancel( mainSizer );
|
||||
|
||||
SetSizerAndFit( &mainSizer );
|
||||
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::IOPCycleDouble_Click ) );
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::WaitCycleExt_Click ) );
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::INTCSTATSlow_Click ) );
|
||||
Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SpeedHacksDialog::IdleLoopFF_Click ) );
|
||||
}
|
||||
|
||||
void SpeedHacksDialog::IOPCycleDouble_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.Hacks.IOPCycleDouble = if it is clicked.
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void SpeedHacksDialog::WaitCycleExt_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.Hacks.WaitCycleExt = if it is clicked.
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void SpeedHacksDialog::INTCSTATSlow_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.Hacks.INTCSTATSlow = if it is clicked.
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void SpeedHacksDialog::IdleLoopFF_Click(wxCommandEvent &event)
|
||||
{
|
||||
//Config.Hacks.IdleLoopFF = if it is clicked.
|
||||
event.Skip();
|
||||
}
|
||||
} // end namespace Dialogs
|
|
@ -0,0 +1,47 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SPEEDHACKSDIALOG_H_INCLUDED
|
||||
#define SPEEDHACKSDIALOG_H_INCLUDED
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/image.h>
|
||||
|
||||
#include "wxHelpers.h"
|
||||
|
||||
namespace Dialogs
|
||||
{
|
||||
class SpeedHacksDialog: public wxDialogWithHelpers
|
||||
{
|
||||
public:
|
||||
SpeedHacksDialog(wxWindow* parent, int id);
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
void IOPCycleDouble_Click(wxCommandEvent &event);
|
||||
void WaitCycleExt_Click(wxCommandEvent &event);
|
||||
void INTCSTATSlow_Click(wxCommandEvent &event);
|
||||
void IdleLoopFF_Click(wxCommandEvent &event);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // SPEEDHACKSDIALOG_H_INCLUDED
|
|
@ -37,13 +37,21 @@ namespace wxHelpers
|
|||
wxCheckBox* retval = new wxCheckBox( parent, id, label );
|
||||
sizer.Add( retval, CheckboxFlags );
|
||||
return *retval;
|
||||
}
|
||||
}
|
||||
|
||||
wxStaticText& AddStaticTextTo(wxWindow* parent, wxBoxSizer& sizer, const wxString& label, int size )
|
||||
{
|
||||
wxStaticText *temp = new wxStaticText(parent, wxID_ANY, label);
|
||||
if (size > 0) temp->Wrap(size);
|
||||
sizer.Add(temp);
|
||||
return *temp;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
wxDialogWithHelpers::wxDialogWithHelpers( wxWindow* parent, int id, const wxString& title, bool hasContextHelp, const wxPoint& pos, const wxSize& size ) :
|
||||
wxDialog( parent, id, title, pos, size ), //, (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxRESIZE_BORDER) ), // flags for resizable dialogs, currently unused.
|
||||
wxDialog( parent, id, title, pos, size , wxDEFAULT_DIALOG_STYLE), //, (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxRESIZE_BORDER) ), // flags for resizable dialogs, currently unused.
|
||||
m_hasContextHelp( hasContextHelp )
|
||||
{
|
||||
if( hasContextHelp )
|
||||
|
@ -58,7 +66,12 @@ wxDialogWithHelpers::wxDialogWithHelpers( wxWindow* parent, int id, const wxStr
|
|||
wxCheckBox& wxDialogWithHelpers::AddCheckBox( wxBoxSizer& sizer, const wxString& label, wxWindowID id )
|
||||
{
|
||||
return wxHelpers::AddCheckBoxTo( this, sizer, label, id );
|
||||
}
|
||||
}
|
||||
|
||||
wxStaticText& wxDialogWithHelpers::AddStaticText(wxBoxSizer& sizer, const wxString& label, int size )
|
||||
{
|
||||
return wxHelpers::AddStaticTextTo( this, sizer, label, size );
|
||||
}
|
||||
|
||||
void wxDialogWithHelpers::AddOkCancel( wxBoxSizer &sizer )
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace wxHelpers
|
|||
// Creates a new checkbox and adds it to the specified sizer/parent combo.
|
||||
// Uses the default spacer setting for adding checkboxes.
|
||||
extern wxCheckBox& AddCheckBoxTo( wxWindow* parent, wxBoxSizer& sizer, const wxString& label, wxWindowID id=wxID_ANY );
|
||||
extern wxStaticText& AddWrappedStaticTextTo(wxWindow* parent, wxBoxSizer& sizer, const wxString& label, int size );
|
||||
|
||||
extern wxSizerFlags stdCenteredFlags;
|
||||
extern wxSizerFlags stdSpacingFlags;
|
||||
|
@ -31,6 +32,7 @@ public:
|
|||
|
||||
protected:
|
||||
wxCheckBox& AddCheckBox( wxBoxSizer& sizer, const wxString& label, wxWindowID id=wxID_ANY );
|
||||
void AddOkCancel( wxBoxSizer& sizer );
|
||||
wxStaticText& AddStaticText(wxBoxSizer& sizer, const wxString& label, int size=0 );
|
||||
void AddOkCancel( wxBoxSizer& sizer );
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue