Implemented the rest of the global game settings dialog fields and added support for optional in serialization
This commit is contained in:
1 parent
ffe4a99baa
commit
03dc0f3d05
8 files changed
+899
-41
No files matched your search
@@ -5,9 +5,10 @@
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
|
||||
GlobalGameSettingsDialog::GlobalGameSettingsDialog(QWidget *parent) :
|
||||
GlobalGameSettingsDialog::GlobalGameSettingsDialog(GlobalGameSettings &globalGameSettings, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::GlobalGameSettingsDialog>()}
|
||||
m_ui{std::make_unique<Ui::GlobalGameSettingsDialog>()},
|
||||
m_globalGameSettings{globalGameSettings}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -18,6 +19,14 @@ GlobalGameSettingsDialog::GlobalGameSettingsDialog(QWidget *parent) :
|
||||
|
||||
updateTitle();
|
||||
|
||||
QWidget* widgets[]{ m_ui->widgetResolution, m_ui->widgetCustomProgressBar };
|
||||
for (QWidget *widget : widgets)
|
||||
{
|
||||
QSizePolicy sp_retain = widget->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
widget->setSizePolicy(sp_retain);
|
||||
}
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
|
||||
Reference in new issue
Block a user