Qt/InterfaceSettings: Add "Show Debugging UI" option

This commit is contained in:
spycrab 2017-09-25 10:21:04 +02:00
parent ff283ff912
commit 2a19ccf806
2 changed files with 7 additions and 0 deletions

View File

@ -123,10 +123,13 @@ void InterfacePane::CreateUI()
m_checkbox_top_window = new QCheckBox(tr("Keep Window on Top")); m_checkbox_top_window = new QCheckBox(tr("Keep Window on Top"));
m_checkbox_render_to_window = new QCheckBox(tr("Render to Main Window")); m_checkbox_render_to_window = new QCheckBox(tr("Render to Main Window"));
m_checkbox_use_builtin_title_database = new QCheckBox(tr("Use Built-In Database of Game Names")); m_checkbox_use_builtin_title_database = new QCheckBox(tr("Use Built-In Database of Game Names"));
m_checkbox_show_debugging_ui = new QCheckBox(tr("Show Debugging UI"));
groupbox_layout->addWidget(m_checkbox_auto_window); groupbox_layout->addWidget(m_checkbox_auto_window);
groupbox_layout->addWidget(m_checkbox_top_window); groupbox_layout->addWidget(m_checkbox_top_window);
groupbox_layout->addWidget(m_checkbox_render_to_window); groupbox_layout->addWidget(m_checkbox_render_to_window);
groupbox_layout->addWidget(m_checkbox_use_builtin_title_database); groupbox_layout->addWidget(m_checkbox_use_builtin_title_database);
groupbox_layout->addWidget(m_checkbox_show_debugging_ui);
} }
void InterfacePane::CreateInGame() void InterfacePane::CreateInGame()
@ -158,6 +161,7 @@ void InterfacePane::ConnectLayout()
connect(m_checkbox_render_to_window, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_render_to_window, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
connect(m_checkbox_use_builtin_title_database, &QCheckBox::clicked, this, connect(m_checkbox_use_builtin_title_database, &QCheckBox::clicked, this,
&InterfacePane::OnSaveConfig); &InterfacePane::OnSaveConfig);
connect(m_checkbox_show_debugging_ui, &QCheckBox::clicked, this, &InterfacePane::OnSaveConfig);
connect(m_combobox_theme, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::activated), connect(m_combobox_theme, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::activated),
&Settings::Instance(), &Settings::SetThemeName); &Settings::Instance(), &Settings::SetThemeName);
connect(m_combobox_language, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, connect(m_combobox_language, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
@ -177,6 +181,7 @@ void InterfacePane::LoadConfig()
m_checkbox_top_window->setChecked(startup_params.bKeepWindowOnTop); m_checkbox_top_window->setChecked(startup_params.bKeepWindowOnTop);
m_checkbox_render_to_window->setChecked(startup_params.bRenderToMain); m_checkbox_render_to_window->setChecked(startup_params.bRenderToMain);
m_checkbox_use_builtin_title_database->setChecked(startup_params.m_use_builtin_title_database); m_checkbox_use_builtin_title_database->setChecked(startup_params.m_use_builtin_title_database);
m_checkbox_show_debugging_ui->setChecked(Settings::Instance().IsDebugModeEnabled());
m_combobox_language->setCurrentIndex(m_combobox_language->findData( m_combobox_language->setCurrentIndex(m_combobox_language->findData(
QString::fromStdString(SConfig::GetInstance().m_InterfaceLanguage))); QString::fromStdString(SConfig::GetInstance().m_InterfaceLanguage)));
m_combobox_theme->setCurrentIndex( m_combobox_theme->setCurrentIndex(
@ -198,6 +203,7 @@ void InterfacePane::OnSaveConfig()
settings.bKeepWindowOnTop = m_checkbox_top_window->isChecked(); settings.bKeepWindowOnTop = m_checkbox_top_window->isChecked();
settings.bRenderToMain = m_checkbox_render_to_window->isChecked(); settings.bRenderToMain = m_checkbox_render_to_window->isChecked();
settings.m_use_builtin_title_database = m_checkbox_use_builtin_title_database->isChecked(); settings.m_use_builtin_title_database = m_checkbox_use_builtin_title_database->isChecked();
Settings::Instance().SetDebugModeEnabled(m_checkbox_show_debugging_ui->isChecked());
// In Game Options // In Game Options
settings.bConfirmStop = m_checkbox_confirm_on_stop->isChecked(); settings.bConfirmStop = m_checkbox_confirm_on_stop->isChecked();

View File

@ -32,6 +32,7 @@ private:
QCheckBox* m_checkbox_top_window; QCheckBox* m_checkbox_top_window;
QCheckBox* m_checkbox_render_to_window; QCheckBox* m_checkbox_render_to_window;
QCheckBox* m_checkbox_use_builtin_title_database; QCheckBox* m_checkbox_use_builtin_title_database;
QCheckBox* m_checkbox_show_debugging_ui;
QCheckBox* m_checkbox_confirm_on_stop; QCheckBox* m_checkbox_confirm_on_stop;
QCheckBox* m_checkbox_use_panic_handlers; QCheckBox* m_checkbox_use_panic_handlers;