Add adjustChaperone setting to BoolSetting

Meant to act as an example of how to add new settings.
This commit is contained in:
Vasily
2019-12-03 08:26:10 +01:00
committed by username223
parent d73fcf3443
commit c2796273e7
3 changed files with 8 additions and 6 deletions
+1
View File
@@ -19,6 +19,7 @@ enum class BoolSetting
PLAYSPACE_oldStyleMotion,
PLAYSPACE_universeCenteredRotation,
PLAYSPACE_enableSeatedMotion,
PLAYSPACE_adjustChaperone,
APPLICATION_disableVersionCheck,
APPLICATION_previousShutdownSafe,
+4
View File
@@ -206,6 +206,10 @@ private:
SettingCategory::Playspace,
QtInfo{ "enableSeatedMotion" },
false },
BoolSettingValue{ BoolSetting::PLAYSPACE_adjustChaperone,
SettingCategory::Playspace,
QtInfo{ "adjustChaperone" },
true },
BoolSettingValue{ BoolSetting::APPLICATION_disableVersionCheck,
SettingCategory::Application,
@@ -42,11 +42,8 @@ void MoveCenterTabController::initStage1()
auto settings = OverlayController::appSettings();
settings->beginGroup( "playspaceSettings" );
auto value = settings->value( "adjustChaperone", m_adjustChaperone );
if ( value.isValid() && !value.isNull() )
{
m_adjustChaperone = value.toBool();
}
m_adjustChaperone = settings::getSetting(
settings::BoolSetting::PLAYSPACE_adjustChaperone );
m_settingsRightHandDragEnabled = settings::getSetting(
settings::BoolSetting::PLAYSPACE_moveShortcutRight );
@@ -61,7 +58,7 @@ void MoveCenterTabController::initStage1()
m_turnBounds
= settings::getSetting( settings::BoolSetting::PLAYSPACE_turnBounds );
value = settings->value( "dragComfortFactor", m_dragComfortFactor );
auto value = settings->value( "dragComfortFactor", m_dragComfortFactor );
if ( value.isValid() && !value.isNull() )
{
m_dragComfortFactor = value.toUInt();