aboutsummaryrefslogtreecommitdiff
path: root/application/pages/global
diff options
context:
space:
mode:
authorJoël Troch <joel.troch62@gmail.com>2020-12-09 23:16:01 +0100
committerJoël Troch <joel.troch62@gmail.com>2021-05-13 19:38:24 +0200
commitde089195cdb79c7f5cf46dd78782d6da5401d8da (patch)
tree677512b9485975dbcd3967a5ac62db0eeab371d2 /application/pages/global
parent3d11f9a7e97301483c50621db9a8b9b7b04d790f (diff)
downloadPrismLauncher-de089195cdb79c7f5cf46dd78782d6da5401d8da.tar.gz
PrismLauncher-de089195cdb79c7f5cf46dd78782d6da5401d8da.tar.bz2
PrismLauncher-de089195cdb79c7f5cf46dd78782d6da5401d8da.zip
GH-3450 Add checkboxes to display and record game time
Diffstat (limited to 'application/pages/global')
-rw-r--r--application/pages/global/MinecraftPage.cpp7
-rw-r--r--application/pages/global/MinecraftPage.ui23
2 files changed, 30 insertions, 0 deletions
diff --git a/application/pages/global/MinecraftPage.cpp b/application/pages/global/MinecraftPage.cpp
index 6a780fb4..6c9bd307 100644
--- a/application/pages/global/MinecraftPage.cpp
+++ b/application/pages/global/MinecraftPage.cpp
@@ -67,6 +67,10 @@ void MinecraftPage::applySettings()
// Native library workarounds
s->set("UseNativeOpenAL", ui->useNativeOpenALCheck->isChecked());
s->set("UseNativeGLFW", ui->useNativeGLFWCheck->isChecked());
+
+ // Game time
+ s->set("ShowGameTime", ui->showGameTime->isChecked());
+ s->set("RecordGameTime", ui->recordGameTime->isChecked());
}
void MinecraftPage::loadSettings()
@@ -80,4 +84,7 @@ void MinecraftPage::loadSettings()
ui->useNativeOpenALCheck->setChecked(s->get("UseNativeOpenAL").toBool());
ui->useNativeGLFWCheck->setChecked(s->get("UseNativeGLFW").toBool());
+
+ ui->showGameTime->setChecked(s->get("ShowGameTime").toBool());
+ ui->recordGameTime->setChecked(s->get("RecordGameTime").toBool());
}
diff --git a/application/pages/global/MinecraftPage.ui b/application/pages/global/MinecraftPage.ui
index c096c969..2abd4bd4 100644
--- a/application/pages/global/MinecraftPage.ui
+++ b/application/pages/global/MinecraftPage.ui
@@ -135,6 +135,29 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="gameTimeGroupBox">
+ <property name="title">
+ <string>Game time</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <widget class="QCheckBox" name="showGameTime">
+ <property name="text">
+ <string>Show time spent playing instances</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="recordGameTime">
+ <property name="text">
+ <string>Record time spent playing instances</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacerMinecraft">
<property name="orientation">
<enum>Qt::Vertical</enum>