From 4292351993c2d10ef72a26d4925e27684f4312f4 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Tue, 27 Feb 2018 20:17:21 -0600 Subject: [PATCH 1/2] Adding Max Quicksaves setting to Launcher --- apps/launcher/advancedpage.cpp | 9 +++-- files/ui/advancedpage.ui | 66 +++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 10 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 3ba378599..27f3cc39d 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -35,8 +35,11 @@ bool Launcher::AdvancedPage::loadSettings() loadSettingBool(grabCursorCheckBox, "grab cursor", "Input"); loadSettingBool(toggleSneakCheckBox, "toggle sneak", "Input"); - // Other Settings + // Saves Settings loadSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); + maximumQuicksavesComboBox->setValue(mEngineSettings.getInt("max quicksaves", "Saves")); + + // Other Settings QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper(); if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) @@ -69,9 +72,11 @@ void Launcher::AdvancedPage::saveSettings() saveSettingBool(grabCursorCheckBox, "grab cursor", "Input"); saveSettingBool(toggleSneakCheckBox, "toggle sneak", "Input"); - // Other Settings + // Saves Settings saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves"); + mEngineSettings.setInt("max quicksaves", "Saves", maximumQuicksavesComboBox->value()); + // Other Settings std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString(); if (screenshotFormatString != mEngineSettings.getString("screenshot format", "General")) mEngineSettings.setString("screenshot format", "General", screenshotFormatString); diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index 8a0795d34..6832b86df 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -6,7 +6,7 @@ 0 0 - 434 + 671 373 @@ -27,9 +27,9 @@ 0 - 0 - 393 - 437 + -187 + 630 + 510 @@ -139,6 +139,9 @@ + + 1 + Off @@ -207,11 +210,11 @@ - + - Other + Saves - + @@ -222,12 +225,59 @@ + + + + <html><head/><body><p>This setting determines how many quicksave and autosave slots you can have at a time. If greater than 1, quicksaves will be sequentially created each time you quicksave. Once the maximum number of quicksaves has been reached, the oldest quicksave will be recycled the next time you perform a quicksave.</p></body></html> + + + + -1 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Maximum Quicksaves + + + + + + + 1 + + + + + + + + + + + + + Other + + <html><head/><body><p>Specify the format for screen shots taken by pressing the screen shot key (bound to F12 by default). This setting should be the file extension commonly associated with the desired format. The formats supported will be determined at compilation, but “jpg”, “png”, and “tga” should be allowed.</p></body></html> - + -1 From b6d9b6f544ee1e761be5dc8ffa82b9b665eec59f Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Tue, 27 Feb 2018 20:17:43 -0600 Subject: [PATCH 2/2] Formatting improvement for advanced page --- apps/launcher/advancedpage.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index 27f3cc39d..0abefcc8f 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -40,7 +40,6 @@ bool Launcher::AdvancedPage::loadSettings() maximumQuicksavesComboBox->setValue(mEngineSettings.getInt("max quicksaves", "Saves")); // Other Settings - QString screenshotFormatString = QString::fromStdString(mEngineSettings.getString("screenshot format", "General")).toUpper(); if (screenshotFormatComboBox->findText(screenshotFormatString) == -1) screenshotFormatComboBox->addItem(screenshotFormatString);