diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp
index 9a1d1ca3..e5deb791 100644
--- a/launcher/Launcher.cpp
+++ b/launcher/Launcher.cpp
@@ -644,6 +644,7 @@ Launcher::Launcher(int &argc, char **argv) : QApplication(argc, argv)
// Game time
m_settings->registerSetting("ShowGameTime", true);
+ m_settings->registerSetting("ShowGlobalGameTime", true);
m_settings->registerSetting("RecordGameTime", true);
// Minecraft launch method
diff --git a/launcher/MainWindow.cpp b/launcher/MainWindow.cpp
index 33d9c7f4..0c414285 100644
--- a/launcher/MainWindow.cpp
+++ b/launcher/MainWindow.cpp
@@ -1610,6 +1610,7 @@ void MainWindow::globalSettingsClosed()
proxymodel->invalidate();
proxymodel->sort(0);
updateToolsMenu();
+ updateStatusCenter();
update();
}
@@ -1927,6 +1928,8 @@ void MainWindow::checkInstancePathForProblems()
void MainWindow::updateStatusCenter()
{
+ m_statusCenter->setVisible(LAUNCHER->settings()->get("ShowGlobalGameTime").toBool());
+
int timePlayed = LAUNCHER->instances()->getTotalPlayTime();
if (timePlayed > 0) {
m_statusCenter->setText(tr("Total playtime: %1").arg(Time::prettifyDuration(timePlayed)));
diff --git a/launcher/pages/global/MinecraftPage.cpp b/launcher/pages/global/MinecraftPage.cpp
index 2830dc7c..342941f4 100644
--- a/launcher/pages/global/MinecraftPage.cpp
+++ b/launcher/pages/global/MinecraftPage.cpp
@@ -54,7 +54,6 @@ void MinecraftPage::on_maximizedCheckBox_clicked(bool checked)
updateCheckboxStuff();
}
-
void MinecraftPage::applySettings()
{
auto s = LAUNCHER->settings();
@@ -70,6 +69,7 @@ void MinecraftPage::applySettings()
// Game time
s->set("ShowGameTime", ui->showGameTime->isChecked());
+ s->set("ShowGlobalGameTime", ui->showGlobalGameTime->isChecked());
s->set("RecordGameTime", ui->recordGameTime->isChecked());
}
@@ -86,5 +86,6 @@ void MinecraftPage::loadSettings()
ui->useNativeGLFWCheck->setChecked(s->get("UseNativeGLFW").toBool());
ui->showGameTime->setChecked(s->get("ShowGameTime").toBool());
+ ui->showGlobalGameTime->setChecked(s->get("ShowGlobalGameTime").toBool());
ui->recordGameTime->setChecked(s->get("RecordGameTime").toBool());
}
diff --git a/launcher/pages/global/MinecraftPage.ui b/launcher/pages/global/MinecraftPage.ui
index 2abd4bd4..857b8cfb 100644
--- a/launcher/pages/global/MinecraftPage.ui
+++ b/launcher/pages/global/MinecraftPage.ui
@@ -147,6 +147,13 @@
+ -
+
+
+ Show time spent playing across all instances
+
+
+
-