Add adjustChaperone setting to BoolSetting
Meant to act as an example of how to add new settings.
This commit is contained in:
@@ -19,6 +19,7 @@ enum class BoolSetting
|
||||
PLAYSPACE_oldStyleMotion,
|
||||
PLAYSPACE_universeCenteredRotation,
|
||||
PLAYSPACE_enableSeatedMotion,
|
||||
PLAYSPACE_adjustChaperone,
|
||||
|
||||
APPLICATION_disableVersionCheck,
|
||||
APPLICATION_previousShutdownSafe,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user