Added checkbox under Config > Interface.

This commit is contained in:
Gerik Kubiak 2015-03-16 22:13:27 -07:00
parent 88fb8edf8e
commit 0a28f7de13
2 changed files with 10 additions and 0 deletions

View File

@ -154,6 +154,7 @@ EVT_SLIDER(ID_VOLUME, CConfigMain::AudioSettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_ONSCREENDISPLAYMESSAGES, CConfigMain::DisplaySettingsChanged)
EVT_CHECKBOX(ID_INTERFACE_PAUSEONFOCUSLOST, CConfigMain::DisplaySettingsChanged)
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::DisplaySettingsChanged)
EVT_BUTTON(ID_HOTKEY_CONFIG, CConfigMain::DisplaySettingsChanged)
@ -354,6 +355,7 @@ void CConfigMain::InitializeGUIValues()
ConfirmStop->SetValue(startup_params.bConfirmStop);
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
OnScreenDisplayMessages->SetValue(startup_params.bOnScreenDisplayMessages);
PauseOnFocusLost->SetValue(SConfig::GetInstance().m_PauseOnFocusLost);
// need redesign
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
{
@ -486,6 +488,7 @@ void CConfigMain::InitializeGUITooltips()
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occurred.\nDisabling this may avoid annoying and non-fatal messages, but it may result in major crashes having no explanation at all."));
OnScreenDisplayMessages->SetToolTip(_("Display messages over the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
PauseOnFocusLost->SetToolTip(_("Pauses the emulator when focus is taken away from the emulation screen."));
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
@ -577,6 +580,7 @@ void CConfigMain::CreateGUIControls()
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm on Stop"));
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS, _("Use Panic Handlers"));
OnScreenDisplayMessages = new wxCheckBox(DisplayPage, ID_INTERFACE_ONSCREENDISPLAYMESSAGES, _("On-Screen Display Messages"));
PauseOnFocusLost = new wxCheckBox(DisplayPage, ID_INTERFACE_PAUSEONFOCUSLOST, _("Pause on Focus Lost"));
wxBoxSizer* sInterface = new wxBoxSizer(wxHORIZONTAL);
sInterface->Add(TEXT_BOX(DisplayPage, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
@ -623,6 +627,7 @@ void CConfigMain::CreateGUIControls()
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
sbInterface->Add(OnScreenDisplayMessages, 0, wxALL, 5);
sbInterface->Add(PauseOnFocusLost, 0, wxALL, 5);
sbInterface->Add(scInterface, 0, wxEXPAND | wxALL, 5);
sbInterface->Add(sInterface, 0, wxEXPAND | wxALL, 5);
sDisplayPage = new wxBoxSizer(wxVERTICAL);
@ -938,6 +943,9 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages = OnScreenDisplayMessages->IsChecked();
SetEnableAlert(OnScreenDisplayMessages->IsChecked());
break;
case ID_INTERFACE_PAUSEONFOCUSLOST:
SConfig::GetInstance().m_PauseOnFocusLost = PauseOnFocusLost->IsChecked();
break;
case ID_INTERFACE_LANG:
if (SConfig::GetInstance().m_InterfaceLanguage != langIds[InterfaceLang->GetSelection()])
SuccessAlertT("You must restart Dolphin in order for the change to take effect.");

View File

@ -99,6 +99,7 @@ private:
ID_INTERFACE_CONFIRMSTOP,
ID_INTERFACE_USEPANICHANDLERS,
ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
ID_INTERFACE_PAUSEONFOCUSLOST,
ID_INTERFACE_LANG,
ID_HOTKEY_CONFIG,
@ -170,6 +171,7 @@ private:
wxCheckBox* ConfirmStop;
wxCheckBox* UsePanicHandlers;
wxCheckBox* OnScreenDisplayMessages;
wxCheckBox* PauseOnFocusLost;
wxChoice* InterfaceLang;
wxButton* HotkeyConfig;