Add remaining double/bool settings in initStage1

This commit is contained in:
Vasily
2019-12-03 08:26:10 +01:00
committed by username223
parent c2796273e7
commit 3c3590539d
3 changed files with 37 additions and 27 deletions
+6
View File
@@ -20,6 +20,8 @@ enum class BoolSetting
PLAYSPACE_universeCenteredRotation, PLAYSPACE_universeCenteredRotation,
PLAYSPACE_enableSeatedMotion, PLAYSPACE_enableSeatedMotion,
PLAYSPACE_adjustChaperone, PLAYSPACE_adjustChaperone,
PLAYSPACE_showLogMatricesButton,
PLAYSPACE_simpleRecenter,
APPLICATION_disableVersionCheck, APPLICATION_disableVersionCheck,
APPLICATION_previousShutdownSafe, APPLICATION_previousShutdownSafe,
@@ -35,6 +37,10 @@ enum class BoolSetting
enum class DoubleSetting enum class DoubleSetting
{ {
PLAYSPACE_heightToggleOffset,
PLAYSPACE_gravityStrength,
PLAYSPACE_flingStrength,
UTILITY_desktopWidth, UTILITY_desktopWidth,
VIDEO_brightnessOpacityValue, VIDEO_brightnessOpacityValue,
+20
View File
@@ -210,6 +210,14 @@ private:
SettingCategory::Playspace, SettingCategory::Playspace,
QtInfo{ "adjustChaperone" }, QtInfo{ "adjustChaperone" },
true }, true },
BoolSettingValue{ BoolSetting::PLAYSPACE_showLogMatricesButton,
SettingCategory::Playspace,
QtInfo{ "showLogMatricesButton" },
false },
BoolSettingValue{ BoolSetting::PLAYSPACE_simpleRecenter,
SettingCategory::Playspace,
QtInfo{ "simpleRecenter" },
false },
BoolSettingValue{ BoolSetting::APPLICATION_disableVersionCheck, BoolSettingValue{ BoolSetting::APPLICATION_disableVersionCheck,
SettingCategory::Application, SettingCategory::Application,
@@ -242,6 +250,18 @@ private:
constexpr static auto doubleSettingSize constexpr static auto doubleSettingSize
= static_cast<int>( DoubleSetting::LAST_ENUMERATOR ) + 1; = static_cast<int>( DoubleSetting::LAST_ENUMERATOR ) + 1;
std::array<DoubleSettingValue, doubleSettingSize> m_doubleSettings{ std::array<DoubleSettingValue, doubleSettingSize> m_doubleSettings{
DoubleSettingValue{ DoubleSetting::PLAYSPACE_heightToggleOffset,
SettingCategory::Playspace,
QtInfo{ "heightToggleOffset" },
-1.0 },
DoubleSettingValue{ DoubleSetting::PLAYSPACE_gravityStrength,
SettingCategory::Playspace,
QtInfo{ "gravityStrength" },
9.8 },
DoubleSettingValue{ DoubleSetting::PLAYSPACE_flingStrength,
SettingCategory::Playspace,
QtInfo{ "flingStrength" },
1.0 },
DoubleSettingValue{ DoubleSetting::UTILITY_desktopWidth, DoubleSettingValue{ DoubleSetting::UTILITY_desktopWidth,
SettingCategory::Utility, SettingCategory::Utility,
QtInfo{ "desktopWidth" }, QtInfo{ "desktopWidth" },
+11 -27
View File
@@ -78,21 +78,13 @@ void MoveCenterTabController::initStage1()
{ {
m_smoothTurnRate = value.toInt(); m_smoothTurnRate = value.toInt();
} }
value = settings->value( "heightToggleOffset", m_heightToggleOffset );
if ( value.isValid() && !value.isNull() ) m_heightToggleOffset = static_cast<float>( settings::getSetting(
{ settings::DoubleSetting::PLAYSPACE_heightToggleOffset ) );
m_heightToggleOffset = value.toFloat(); m_gravityStrength = static_cast<float>( settings::getSetting(
} settings::DoubleSetting::PLAYSPACE_gravityStrength ) );
value = settings->value( "gravityStrength", m_gravityStrength ); m_flingStrength = static_cast<float>( settings::getSetting(
if ( value.isValid() && !value.isNull() ) settings::DoubleSetting::PLAYSPACE_flingStrength ) );
{
m_gravityStrength = value.toFloat();
}
value = settings->value( "flingStrength", m_flingStrength );
if ( value.isValid() && !value.isNull() )
{
m_flingStrength = value.toFloat();
}
m_momentumSave m_momentumSave
= settings::getSetting( settings::BoolSetting::PLAYSPACE_momentumSave ); = settings::getSetting( settings::BoolSetting::PLAYSPACE_momentumSave );
@@ -102,13 +94,8 @@ void MoveCenterTabController::initStage1()
= settings::getSetting( settings::BoolSetting::PLAYSPACE_lockYToggle ); = settings::getSetting( settings::BoolSetting::PLAYSPACE_lockYToggle );
m_lockZToggle m_lockZToggle
= settings::getSetting( settings::BoolSetting::PLAYSPACE_lockZToggle ); = settings::getSetting( settings::BoolSetting::PLAYSPACE_lockZToggle );
m_showLogMatricesButton = settings::getSetting(
value = settings->value( "showLogMatricesButton", m_showLogMatricesButton ); settings::BoolSetting::PLAYSPACE_showLogMatricesButton );
if ( value.isValid() && !value.isNull() )
{
m_showLogMatricesButton = value.toBool();
}
m_allowExternalEdits = settings::getSetting( m_allowExternalEdits = settings::getSetting(
settings::BoolSetting::PLAYSPACE_allowExternalEdits ); settings::BoolSetting::PLAYSPACE_allowExternalEdits );
m_oldStyleMotion = settings::getSetting( m_oldStyleMotion = settings::getSetting(
@@ -117,12 +104,9 @@ void MoveCenterTabController::initStage1()
settings::BoolSetting::PLAYSPACE_universeCenteredRotation ); settings::BoolSetting::PLAYSPACE_universeCenteredRotation );
m_enableSeatedMotion = settings::getSetting( m_enableSeatedMotion = settings::getSetting(
settings::BoolSetting::PLAYSPACE_enableSeatedMotion ); settings::BoolSetting::PLAYSPACE_enableSeatedMotion );
m_simpleRecenter = settings::getSetting(
settings::BoolSetting::PLAYSPACE_simpleRecenter );
value = settings->value( "simpleRecenter", m_simpleRecenter );
if ( value.isValid() && !value.isNull() )
{
m_simpleRecenter = value.toBool();
}
settings->endGroup(); settings->endGroup();
reloadOffsetProfiles(); reloadOffsetProfiles();
m_k_moveCenterSettingsUpdateCounter m_k_moveCenterSettingsUpdateCounter