mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Settings: emit HideCursorChanged()
This commit is contained in:
parent
14da8232f6
commit
833e38ed56
@ -213,6 +213,17 @@ QSize Settings::GetRenderWindowSize() const
|
|||||||
return value(QStringLiteral("Graphics/RenderWindowSize"), QSize(640, 480)).toSize();
|
return value(QStringLiteral("Graphics/RenderWindowSize"), QSize(640, 480)).toSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Settings::SetHideCursor(bool hide_cursor)
|
||||||
|
{
|
||||||
|
SConfig::GetInstance().bHideCursor = hide_cursor;
|
||||||
|
emit HideCursorChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Settings::GetHideCursor() const
|
||||||
|
{
|
||||||
|
return SConfig::GetInstance().bHideCursor;
|
||||||
|
}
|
||||||
|
|
||||||
bool& Settings::BannerVisible() const
|
bool& Settings::BannerVisible() const
|
||||||
{
|
{
|
||||||
return SConfig::GetInstance().m_showBannerColumn;
|
return SConfig::GetInstance().m_showBannerColumn;
|
||||||
|
@ -71,6 +71,8 @@ public:
|
|||||||
bool GetRenderToMain() const;
|
bool GetRenderToMain() const;
|
||||||
bool GetFullScreen() const;
|
bool GetFullScreen() const;
|
||||||
QSize GetRenderWindowSize() const;
|
QSize GetRenderWindowSize() const;
|
||||||
|
void SetHideCursor(bool hide_cursor);
|
||||||
|
bool GetHideCursor() const;
|
||||||
|
|
||||||
// Columns
|
// Columns
|
||||||
bool& BannerVisible() const;
|
bool& BannerVisible() const;
|
||||||
@ -111,6 +113,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void PathAdded(const QString&);
|
void PathAdded(const QString&);
|
||||||
void PathRemoved(const QString&);
|
void PathRemoved(const QString&);
|
||||||
|
void HideCursorChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Settings();
|
Settings();
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
|
|
||||||
|
#include "DolphinQt2/Settings.h"
|
||||||
|
|
||||||
InterfacePane::InterfacePane(QWidget* parent) : QWidget(parent)
|
InterfacePane::InterfacePane(QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
CreateLayout();
|
CreateLayout();
|
||||||
@ -113,7 +115,8 @@ void InterfacePane::ConnectLayout()
|
|||||||
connect(m_checkbox_use_panic_handlers, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_use_panic_handlers, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
||||||
connect(m_checkbox_enable_osd, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_enable_osd, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
||||||
connect(m_checkbox_pause_on_focus_lost, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_pause_on_focus_lost, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
||||||
connect(m_checkbox_hide_mouse, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
|
connect(m_checkbox_hide_mouse, &QCheckBox::clicked, &Settings::Instance(),
|
||||||
|
&Settings::SetHideCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterfacePane::LoadConfig()
|
void InterfacePane::LoadConfig()
|
||||||
@ -131,7 +134,7 @@ void InterfacePane::LoadConfig()
|
|||||||
m_checkbox_enable_osd->setChecked(startup_params.bOnScreenDisplayMessages);
|
m_checkbox_enable_osd->setChecked(startup_params.bOnScreenDisplayMessages);
|
||||||
m_checkbox_show_active_title->setChecked(startup_params.m_show_active_title);
|
m_checkbox_show_active_title->setChecked(startup_params.m_show_active_title);
|
||||||
m_checkbox_pause_on_focus_lost->setChecked(startup_params.m_PauseOnFocusLost);
|
m_checkbox_pause_on_focus_lost->setChecked(startup_params.m_PauseOnFocusLost);
|
||||||
m_checkbox_hide_mouse->setChecked(startup_params.bHideCursor);
|
m_checkbox_hide_mouse->setChecked(Settings::Instance().GetHideCursor());
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterfacePane::OnSaveConfig()
|
void InterfacePane::OnSaveConfig()
|
||||||
@ -148,7 +151,6 @@ void InterfacePane::OnSaveConfig()
|
|||||||
settings.bOnScreenDisplayMessages = m_checkbox_enable_osd->isChecked();
|
settings.bOnScreenDisplayMessages = m_checkbox_enable_osd->isChecked();
|
||||||
settings.m_show_active_title = m_checkbox_show_active_title->isChecked();
|
settings.m_show_active_title = m_checkbox_show_active_title->isChecked();
|
||||||
settings.m_PauseOnFocusLost = m_checkbox_pause_on_focus_lost->isChecked();
|
settings.m_PauseOnFocusLost = m_checkbox_pause_on_focus_lost->isChecked();
|
||||||
settings.bHideCursor = m_checkbox_hide_mouse->isChecked();
|
|
||||||
|
|
||||||
settings.SaveSettings();
|
settings.SaveSettings();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user