Added option to toggle the display of On-Screen Display messages in the Interface tab.
This commit is contained in:
parent
a135512f9b
commit
d6697d50c7
|
@ -161,6 +161,7 @@ void SConfig::SaveSettings()
|
||||||
// Interface
|
// Interface
|
||||||
ini.Set("Interface", "ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
|
ini.Set("Interface", "ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
|
||||||
ini.Set("Interface", "UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
|
ini.Set("Interface", "UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
|
||||||
|
ini.Set("Interface", "OnScreenDisplayMessages", m_LocalCoreStartupParameter.bOnScreenDisplayMessages);
|
||||||
ini.Set("Interface", "HideCursor", m_LocalCoreStartupParameter.bHideCursor);
|
ini.Set("Interface", "HideCursor", m_LocalCoreStartupParameter.bHideCursor);
|
||||||
ini.Set("Interface", "AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
|
ini.Set("Interface", "AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
|
||||||
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
|
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
|
||||||
|
@ -296,6 +297,7 @@ void SConfig::LoadSettings()
|
||||||
// Interface
|
// Interface
|
||||||
ini.Get("Interface", "ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, false);
|
ini.Get("Interface", "ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, false);
|
||||||
ini.Get("Interface", "UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
|
ini.Get("Interface", "UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
|
||||||
|
ini.Get("Interface", "OnScreenDisplayMessages", &m_LocalCoreStartupParameter.bOnScreenDisplayMessages, true);
|
||||||
ini.Get("Interface", "HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
|
ini.Get("Interface", "HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
|
||||||
ini.Get("Interface", "AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
|
ini.Get("Interface", "AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
|
||||||
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
||||||
|
|
|
@ -53,7 +53,7 @@ SCoreStartupParameter::SCoreStartupParameter()
|
||||||
bFastDiscSpeed(false),
|
bFastDiscSpeed(false),
|
||||||
SelectedLanguage(0), bWii(false), bDisableWiimoteSpeaker(false),
|
SelectedLanguage(0), bWii(false), bDisableWiimoteSpeaker(false),
|
||||||
bConfirmStop(false), bHideCursor(false),
|
bConfirmStop(false), bHideCursor(false),
|
||||||
bAutoHideCursor(false), bUsePanicHandlers(true),
|
bAutoHideCursor(false), bUsePanicHandlers(true), bOnScreenDisplayMessages(true),
|
||||||
iRenderWindowXPos(-1), iRenderWindowYPos(-1),
|
iRenderWindowXPos(-1), iRenderWindowYPos(-1),
|
||||||
iRenderWindowWidth(640), iRenderWindowHeight(480),
|
iRenderWindowWidth(640), iRenderWindowHeight(480),
|
||||||
bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
|
bRenderWindowAutoSize(false), bKeepWindowOnTop(false),
|
||||||
|
|
|
@ -122,7 +122,7 @@ struct SCoreStartupParameter
|
||||||
bool bDisableWiimoteSpeaker;
|
bool bDisableWiimoteSpeaker;
|
||||||
|
|
||||||
// Interface settings
|
// Interface settings
|
||||||
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers;
|
bool bConfirmStop, bHideCursor, bAutoHideCursor, bUsePanicHandlers, bOnScreenDisplayMessages;
|
||||||
|
|
||||||
// Hotkeys
|
// Hotkeys
|
||||||
int iHotkey[NUM_HOTKEYS];
|
int iHotkey[NUM_HOTKEYS];
|
||||||
|
|
|
@ -125,6 +125,7 @@ EVT_SLIDER(ID_VOLUME, CConfigMain::AudioSettingsChanged)
|
||||||
|
|
||||||
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
|
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
|
||||||
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
|
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
|
||||||
|
EVT_CHECKBOX(ID_INTERFACE_ONSCREENDISPLAYMESSAGES, CConfigMain::DisplaySettingsChanged)
|
||||||
EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::DisplaySettingsChanged)
|
EVT_RADIOBOX(ID_INTERFACE_THEME, CConfigMain::DisplaySettingsChanged)
|
||||||
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::DisplaySettingsChanged)
|
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::DisplaySettingsChanged)
|
||||||
EVT_BUTTON(ID_HOTKEY_CONFIG, CConfigMain::DisplaySettingsChanged)
|
EVT_BUTTON(ID_HOTKEY_CONFIG, CConfigMain::DisplaySettingsChanged)
|
||||||
|
@ -337,6 +338,7 @@ void CConfigMain::InitializeGUIValues()
|
||||||
// Display - Interface
|
// Display - Interface
|
||||||
ConfirmStop->SetValue(startup_params.bConfirmStop);
|
ConfirmStop->SetValue(startup_params.bConfirmStop);
|
||||||
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
|
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
|
||||||
|
OnScreenDisplayMessages->SetValue(startup_params.bOnScreenDisplayMessages);
|
||||||
Theme->SetSelection(startup_params.iTheme);
|
Theme->SetSelection(startup_params.iTheme);
|
||||||
// need redesign
|
// need redesign
|
||||||
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
|
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
|
||||||
|
@ -490,6 +492,7 @@ void CConfigMain::InitializeGUITooltips()
|
||||||
// Display - Interface
|
// Display - Interface
|
||||||
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
|
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
|
||||||
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occured.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
|
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occured.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
|
||||||
|
OnScreenDisplayMessages->SetToolTip(_("Show messages on the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
|
||||||
|
|
||||||
// Display - Themes: Copyright notice
|
// Display - Themes: Copyright notice
|
||||||
Theme->SetItemToolTip(0, _("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
|
Theme->SetItemToolTip(0, _("Created by Milosz Wlazlo [miloszwl@miloszwl.com, miloszwl.deviantart.com]"));
|
||||||
|
@ -579,6 +582,8 @@ void CConfigMain::CreateGUIControls()
|
||||||
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS,
|
UsePanicHandlers = new wxCheckBox(DisplayPage, ID_INTERFACE_USEPANICHANDLERS,
|
||||||
_("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
_("Use Panic Handlers"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
OnScreenDisplayMessages = new wxCheckBox(DisplayPage, ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
|
||||||
|
_("On-Screen Display Messages"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
wxBoxSizer* sInterface = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sInterface = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sInterface->Add(TEXT_BOX(DisplayPage, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
sInterface->Add(TEXT_BOX(DisplayPage, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
|
@ -588,6 +593,7 @@ void CConfigMain::CreateGUIControls()
|
||||||
sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings"));
|
sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings"));
|
||||||
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
|
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
|
||||||
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
|
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
|
||||||
|
sbInterface->Add(OnScreenDisplayMessages, 0, wxALL, 5);
|
||||||
sbInterface->Add(Theme, 0, wxEXPAND | wxALL, 5);
|
sbInterface->Add(Theme, 0, wxEXPAND | wxALL, 5);
|
||||||
sbInterface->Add(sInterface, 0, wxEXPAND | wxALL, 5);
|
sbInterface->Add(sInterface, 0, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
|
@ -865,6 +871,10 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = UsePanicHandlers->IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = UsePanicHandlers->IsChecked();
|
||||||
SetEnableAlert(UsePanicHandlers->IsChecked());
|
SetEnableAlert(UsePanicHandlers->IsChecked());
|
||||||
break;
|
break;
|
||||||
|
case ID_INTERFACE_ONSCREENDISPLAYMESSAGES:
|
||||||
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages = OnScreenDisplayMessages->IsChecked();
|
||||||
|
SetEnableAlert(OnScreenDisplayMessages->IsChecked());
|
||||||
|
break;
|
||||||
case ID_INTERFACE_THEME:
|
case ID_INTERFACE_THEME:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme = Theme->GetSelection();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme = Theme->GetSelection();
|
||||||
main_frame->InitBitmaps();
|
main_frame->InitBitmaps();
|
||||||
|
|
|
@ -86,6 +86,7 @@ private:
|
||||||
// Interface settings
|
// Interface settings
|
||||||
ID_INTERFACE_CONFIRMSTOP,
|
ID_INTERFACE_CONFIRMSTOP,
|
||||||
ID_INTERFACE_USEPANICHANDLERS,
|
ID_INTERFACE_USEPANICHANDLERS,
|
||||||
|
ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
|
||||||
ID_INTERFACE_THEME,
|
ID_INTERFACE_THEME,
|
||||||
ID_INTERFACE_LANG,
|
ID_INTERFACE_LANG,
|
||||||
ID_HOTKEY_CONFIG,
|
ID_HOTKEY_CONFIG,
|
||||||
|
@ -163,6 +164,7 @@ private:
|
||||||
// Interface
|
// Interface
|
||||||
wxCheckBox* ConfirmStop;
|
wxCheckBox* ConfirmStop;
|
||||||
wxCheckBox* UsePanicHandlers;
|
wxCheckBox* UsePanicHandlers;
|
||||||
|
wxCheckBox* OnScreenDisplayMessages;
|
||||||
wxRadioBox* Theme;
|
wxRadioBox* Theme;
|
||||||
wxChoice* InterfaceLang;
|
wxChoice* InterfaceLang;
|
||||||
wxButton* HotkeyConfig;
|
wxButton* HotkeyConfig;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|
||||||
|
#include "ConfigManager.h"
|
||||||
#include "OnScreenDisplay.h"
|
#include "OnScreenDisplay.h"
|
||||||
#include "RenderBase.h"
|
#include "RenderBase.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
@ -47,6 +48,8 @@ void AddMessage(const char* pstr, u32 ms)
|
||||||
|
|
||||||
void DrawMessages()
|
void DrawMessages()
|
||||||
{
|
{
|
||||||
|
if(!SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages) return;
|
||||||
|
|
||||||
if (s_listMsgs.size() > 0)
|
if (s_listMsgs.size() > 0)
|
||||||
{
|
{
|
||||||
int left = 25, top = 15;
|
int left = 25, top = 15;
|
||||||
|
|
Loading…
Reference in New Issue