/[pcsx2_0.9.7]/trunk/pcsx2/gui/Dialogs/SysConfigDialog.cpp
ViewVC logotype

Contents of /trunk/pcsx2/gui/Dialogs/SysConfigDialog.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 2 months ago) by william
File size: 4716 byte(s)
re-commit (had local access denied errors when committing)
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 #include "PrecompiledHeader.h"
17 #include "System.h"
18 #include "App.h"
19
20 #include "ConfigurationDialog.h"
21 #include "BaseConfigurationDialog.inl"
22 #include "ModalPopups.h"
23 #include "Panels/ConfigurationPanels.h"
24
25 using namespace Panels;
26 using namespace pxSizerFlags;
27
28 static void CheckHacksOverrides()
29 {
30 if( !wxGetApp().Overrides.HasCustomHacks() ) return;
31
32 // The user has commandline overrides enabled, so the options they see here and/or apply won't match
33 // the commandline overrides. Let them know!
34
35 wxDialogWithHelpers dialog( wxFindWindowByName( L"Dialog:" + Dialogs::SysConfigDialog::GetNameStatic() ), _("Config Overrides Warning") );
36
37 dialog += dialog.Text( pxE("!Panel:HasHacksOverrides",
38 L"Warning! You are running PCSX2 with command line options that override your configured settings. "
39 L"These command line options will not be reflected in the Settings dialog, and will be disabled "
40 L"if you apply any changes here."
41 ));
42
43 // [TODO] : List command line option overrides in action?
44
45 pxIssueConfirmation( dialog, MsgButtons().OK(), L"Dialog.SysConfig.Overrides" );
46 }
47
48 static void CheckPluginsOverrides()
49 {
50 if( !wxGetApp().Overrides.HasPluginsOverride() ) return;
51
52 // The user has commandline overrides enabled, so the options they see here and/or apply won't match
53 // the commandline overrides. Let them know!
54
55 wxDialogWithHelpers dialog( NULL, _("Components Overrides Warning") );
56
57 dialog += dialog.Text( pxE("!Panel:HasPluginsOverrides",
58 L"Warning! You are running PCSX2 with command line options that override your configured plugin and/or folder settings. "
59 L"These command line options will not be reflected in the settings dialog, and will be disabled "
60 L"when you apply settings changes here."
61 ));
62
63 // [TODO] : List command line option overrides in action?
64
65 pxIssueConfirmation( dialog, MsgButtons().OK(), L"Dialog.ComponentsConfig.Overrides" );
66 }
67
68 Dialogs::SysConfigDialog::SysConfigDialog(wxWindow* parent)
69 : BaseConfigurationDialog( parent, AddAppName(_("Emulation Settings - %s")), 580 )
70 {
71 ScopedBusyCursor busy( Cursor_ReallyBusy );
72
73 CreateListbook( wxGetApp().GetImgList_Config() );
74 const AppImageIds::ConfigIds& cfgid( wxGetApp().GetImgId().Config );
75
76 AddPage<CpuPanelEE> ( wxLt("EE/IOP"), cfgid.Cpu );
77 AddPage<CpuPanelVU> ( wxLt("VUs"), cfgid.Cpu );
78 AddPage<VideoPanel> ( wxLt("GS"), cfgid.Cpu );
79 AddPage<GSWindowSettingsPanel> ( wxLt("GS Window"), cfgid.Video );
80 AddPage<SpeedHacksPanel> ( wxLt("Speedhacks"), cfgid.Speedhacks );
81 AddPage<GameFixesPanel> ( wxLt("Game Fixes"), cfgid.Gamefixes );
82 //AddPage<GameDatabasePanel> ( wxLt("Game Database"),cfgid.Plugins );
83
84 AddListbook();
85 AddOkCancel();
86
87 if( wxGetApp().Overrides.HasCustomHacks() )
88 wxGetApp().PostMethod( CheckHacksOverrides );
89 }
90
91 Dialogs::ComponentsConfigDialog::ComponentsConfigDialog(wxWindow* parent)
92 : BaseConfigurationDialog( parent, AddAppName(_("Components Selectors - %s")), 600 )
93 {
94 ScopedBusyCursor busy( Cursor_ReallyBusy );
95
96 CreateListbook( wxGetApp().GetImgList_Config() );
97 const AppImageIds::ConfigIds& cfgid( wxGetApp().GetImgId().Config );
98
99 AddPage<PluginSelectorPanel> ( wxLt("Plugins"), cfgid.Plugins );
100 AddPage<BiosSelectorPanel> ( wxLt("BIOS"), cfgid.Cpu );
101
102 AddListbook();
103 AddOkCancel();
104
105 if( wxGetApp().Overrides.HasPluginsOverride() )
106 wxGetApp().PostMethod( CheckPluginsOverrides );
107 }
108
109 Dialogs::InterfaceConfigDialog::InterfaceConfigDialog(wxWindow *parent)
110 : BaseConfigurationDialog( parent, AddAppName(_("Language Selector - %s")), 400 )
111 {
112 ScopedBusyCursor busy( Cursor_ReallyBusy );
113
114 CreateListbook( wxGetApp().GetImgList_Config() );
115 const AppImageIds::ConfigIds& cfgid( wxGetApp().GetImgId().Config );
116
117 AddPage<StandardPathsPanel> ( wxLt("Appearance"), cfgid.Appearance );
118 AddPage<StandardPathsPanel> ( wxLt("Folders"), cfgid.Paths );
119
120 AddListbook();
121 AddOkCancel();
122
123 //*this += new Panels::LanguageSelectionPanel( this ) | pxCenter;
124 //wxDialogWithHelpers::AddOkCancel( NULL, false );
125 }

  ViewVC Help
Powered by ViewVC 1.1.22