mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Last major UI change before release.
- Moved display related options in the "Display" tab from the general config to the gfx config, renamed the tab to "Interface" - Moved Wiimote related options in the "Wii" tab from the general config to the wiimote config - Moved various other options to more appropriate places ("Set Console as NTSC-J", "Skip GC BIOS" - Dropped "Window Size" adjustment - Now displaying a warning if one tries to enable software rendering - Other minor changes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7577 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -65,15 +65,103 @@ WiimoteConfigPage::WiimoteConfigPage(wxWindow* const parent, const int index)
|
||||
Layout();
|
||||
}
|
||||
|
||||
WiimoteGeneralConfigPage::WiimoteGeneralConfigPage(wxWindow* const parent)
|
||||
: wxPanel(parent, -1, wxDefaultPosition)
|
||||
|
||||
{
|
||||
const wxString str[] = { _("Bottom"), _("Top") };
|
||||
wxChoice* const WiiSensBarPos = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 2, str);
|
||||
wxSlider* const WiiSensBarSens = new wxSlider(this, wxID_ANY, 0, 0, 4, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL);
|
||||
wxSlider* const WiimoteSpkVolume = new wxSlider(this, wxID_ANY, 0, 0, 127);
|
||||
wxCheckBox* const WiimoteMotor = new wxCheckBox(this, wxID_ANY, _("Wiimote Motor"));
|
||||
wxCheckBox* const WiimoteReconnectOnLoad = new wxCheckBox(this, wxID_ANY, _("Reconnect Wiimote on State Loading"));
|
||||
|
||||
wxStaticText* const WiiSensBarPosText = new wxStaticText(this, wxID_ANY, _("Sensor Bar Position:"));
|
||||
wxStaticText* const WiiSensBarSensText = new wxStaticText(this, wxID_ANY, _("IR Sensitivity:"));
|
||||
wxStaticText* const WiiSensBarSensMinText = new wxStaticText(this, wxID_ANY, _("Min"));
|
||||
wxStaticText* const WiiSensBarSensMaxText = new wxStaticText(this, wxID_ANY, _("Max"));
|
||||
wxStaticText* const WiimoteSpkVolumeText = new wxStaticText(this, wxID_ANY, _("Speaker Volume:"));
|
||||
wxStaticText* const WiimoteSpkVolumeMinText = new wxStaticText(this, wxID_ANY, _("Min"));
|
||||
wxStaticText* const WiimoteSpkVolumeMaxText = new wxStaticText(this, wxID_ANY, _("Max"));
|
||||
|
||||
WiiSensBarSens->SetMinSize(wxSize(100,-1));
|
||||
WiimoteSpkVolume->SetMinSize(wxSize(100,-1));
|
||||
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
WiiSensBarPos->Disable();
|
||||
WiiSensBarSens->Disable();
|
||||
WiimoteSpkVolume->Disable();
|
||||
WiimoteMotor->Disable();
|
||||
WiiSensBarPosText->Disable();
|
||||
WiiSensBarSensText->Disable();
|
||||
WiiSensBarSensMinText->Disable();
|
||||
WiiSensBarSensMaxText->Disable();
|
||||
WiimoteSpkVolumeText->Disable();
|
||||
WiimoteSpkVolumeMinText->Disable();
|
||||
WiimoteSpkVolumeMaxText->Disable();
|
||||
}
|
||||
|
||||
WiiSensBarPos->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR"));
|
||||
WiiSensBarSens->SetValue(SConfig::GetInstance().m_SYSCONF->GetData<u32>("BT.SENS"));
|
||||
WiimoteSpkVolume->SetValue(SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.SPKV"));
|
||||
WiimoteMotor->SetValue(SConfig::GetInstance().m_SYSCONF->GetData<bool>("BT.MOT"));
|
||||
WiimoteReconnectOnLoad->SetValue(SConfig::GetInstance().m_WiimoteReconnectOnLoad);
|
||||
|
||||
|
||||
_connect_macro_(WiiSensBarPos, WiimoteGeneralConfigPage::OnSensorBarPos, wxEVT_COMMAND_CHOICE_SELECTED, this);
|
||||
_connect_macro_(WiiSensBarSens, WiimoteGeneralConfigPage::OnSensorBarSensitivity, wxEVT_COMMAND_SLIDER_UPDATED, this);
|
||||
_connect_macro_(WiimoteSpkVolume, WiimoteGeneralConfigPage::OnSpeakerVolume, wxEVT_COMMAND_SLIDER_UPDATED, this);
|
||||
_connect_macro_(WiimoteMotor, WiimoteGeneralConfigPage::OnMotor, wxEVT_COMMAND_CHECKBOX_CLICKED, this);
|
||||
_connect_macro_(WiimoteReconnectOnLoad, WiimoteGeneralConfigPage::OnReconnectOnLoad, wxEVT_COMMAND_CHECKBOX_CLICKED, this);
|
||||
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
wxStaticBoxSizer* const general_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("General Settings"));
|
||||
wxFlexGridSizer* const choice_sizer = new wxFlexGridSizer(2, 5, 5);
|
||||
|
||||
wxBoxSizer* const sensbarsens_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sensbarsens_sizer->Add(WiiSensBarSensMinText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
sensbarsens_sizer->Add(WiiSensBarSens);
|
||||
sensbarsens_sizer->Add(WiiSensBarSensMaxText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
|
||||
wxBoxSizer* const spkvol_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
spkvol_sizer->Add(WiimoteSpkVolumeMinText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
spkvol_sizer->Add(WiimoteSpkVolume);
|
||||
spkvol_sizer->Add(WiimoteSpkVolumeMaxText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
|
||||
choice_sizer->Add(WiiSensBarPosText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
choice_sizer->Add(WiiSensBarPos);
|
||||
choice_sizer->Add(WiiSensBarSensText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
choice_sizer->Add(sensbarsens_sizer);
|
||||
choice_sizer->Add(WiimoteSpkVolumeText, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
choice_sizer->Add(spkvol_sizer);
|
||||
|
||||
|
||||
wxGridSizer* const wiimote_sizer = new wxGridSizer(1, 5, 5);
|
||||
wiimote_sizer->Add(WiimoteMotor);
|
||||
wiimote_sizer->Add(WiimoteReconnectOnLoad);
|
||||
|
||||
general_sizer->Add(choice_sizer);
|
||||
general_sizer->Add(wiimote_sizer);
|
||||
|
||||
main_sizer->Add(general_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
main_sizer->AddStretchSpacer();
|
||||
SetSizerAndFit(main_sizer);
|
||||
Layout();
|
||||
}
|
||||
|
||||
WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin)
|
||||
: wxDialog(parent, -1, _("Dolphin Wiimote Configuration"), wxDefaultPosition, wxDefaultSize)
|
||||
, m_plugin(plugin)
|
||||
{
|
||||
m_pad_notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, wxNB_DEFAULT);
|
||||
m_pad_notebook->AddPage(new WiimoteGeneralConfigPage(m_pad_notebook), wxString(_("General")));
|
||||
for (unsigned int i = 0; i < 4; ++i)
|
||||
{
|
||||
WiimoteConfigPage* const wpage = new WiimoteConfigPage(m_pad_notebook, i);
|
||||
m_pad_notebook->AddPage(wpage, wxString(_("Wiimote ")) + wxChar('1'+i));
|
||||
m_wiimote_config_pages.push_back(wpage);
|
||||
}
|
||||
m_pad_notebook->SetSelection(0);
|
||||
|
||||
@ -97,16 +185,15 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin
|
||||
|
||||
void WiimoteConfigDiag::ConfigEmulatedWiimote(wxCommandEvent&)
|
||||
{
|
||||
InputConfigDialog* const m_emu_config_diag = new InputConfigDialog(this, m_plugin, _trans("Dolphin Emulated Wiimote Configuration"), m_pad_notebook->GetSelection());
|
||||
InputConfigDialog* const m_emu_config_diag = new InputConfigDialog(this, m_plugin, _trans("Dolphin Emulated Wiimote Configuration"), m_pad_notebook->GetSelection()-1);
|
||||
m_emu_config_diag->ShowModal();
|
||||
m_emu_config_diag->Destroy();
|
||||
}
|
||||
|
||||
void WiimoteConfigDiag::UpdateGUI()
|
||||
{
|
||||
for (size_t p = 0; p < m_pad_notebook->GetPageCount(); ++p)
|
||||
((WiimoteConfigPage*)m_pad_notebook->GetPage(p))->
|
||||
connected_wiimotes_txt->SetLabel(ConnectedWiimotesString());
|
||||
for (std::vector<WiimoteConfigPage*>::iterator it = m_wiimote_config_pages.begin(); it != m_wiimote_config_pages.end(); ++it)
|
||||
(*it)->connected_wiimotes_txt->SetLabel(ConnectedWiimotesString());
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -174,8 +261,8 @@ void WiimoteConfigDiag::Save(wxCommandEvent& event)
|
||||
|
||||
sec.Set("Source", (int)g_wiimote_sources[i]);
|
||||
}
|
||||
for (size_t p = 0; p < m_pad_notebook->GetPageCount(); ++p)
|
||||
((WiimoteConfigPage*)m_pad_notebook->GetPage(p))->UpdateWiimoteStatus();
|
||||
for (std::vector<WiimoteConfigPage*>::iterator it = m_wiimote_config_pages.begin(); it != m_wiimote_config_pages.end(); ++it)
|
||||
(*it)->UpdateWiimoteStatus();
|
||||
|
||||
inifile.Save(ini_filename);
|
||||
|
||||
@ -184,8 +271,8 @@ void WiimoteConfigDiag::Save(wxCommandEvent& event)
|
||||
|
||||
void WiimoteConfigDiag::Cancel(wxCommandEvent& event)
|
||||
{
|
||||
for (size_t p = 0; p < m_pad_notebook->GetPageCount(); ++p)
|
||||
((WiimoteConfigPage*)m_pad_notebook->GetPage(p))->RevertSource();
|
||||
for (std::vector<WiimoteConfigPage*>::iterator it = m_wiimote_config_pages.begin(); it != m_wiimote_config_pages.end(); ++it)
|
||||
(*it)->RevertSource();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
Reference in New Issue
Block a user