mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-22 11:39:55 +00:00
NOISSUE Add setting to display playtime in hours only
This commit is contained in:
@@ -2006,6 +2006,10 @@ void MainWindow::updateStatusCenter()
|
||||
|
||||
int timePlayed = APPLICATION->instances()->getTotalPlayTime();
|
||||
if (timePlayed > 0) {
|
||||
m_statusCenter->setText(tr("Total playtime: %1").arg(Time::prettifyDuration(timePlayed)));
|
||||
if (APPLICATION->settings()->get("ShowGameTimeHours").toBool()) {
|
||||
m_statusCenter->setText(tr("Total playtime: %1 hours").arg(timePlayed / 3600.0, 0, 'f', 1));
|
||||
} else {
|
||||
m_statusCenter->setText(tr("Total playtime: %1").arg(Time::prettifyDuration(timePlayed)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user