GH-3450 Add checkboxes to display and record game time

This commit is contained in:
Joël Troch
2020-12-09 23:16:01 +01:00
parent 3d11f9a7e9
commit de089195cd
7 changed files with 119 additions and 1 deletions

View File

@ -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());
}

View File

@ -134,6 +134,29 @@
</layout>
</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">