< Summary

Class:DCL.SettingsControls.PlayersNameOpacityControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/PlayersNameOpacityControlController.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:25
Line coverage:100% (9 of 9)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Initialize()0%110100%
GetStoredValue()0%110100%
UpdateSetting(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/PlayersNameOpacityControlController.cs

#LineLine coverage
 1using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 2using UnityEngine;
 3
 4namespace DCL.SettingsControls
 5{
 6    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Players Name Opacity", fileName = "PlayersNameOpacity")]
 7    public class PlayersNameOpacityControlController : SliderSettingsControlController
 8    {
 9        public override void Initialize()
 10        {
 111            base.Initialize();
 112            UpdateSetting(currentGeneralSettings.namesOpacity);
 113        }
 14
 115        public override object GetStoredValue() { return currentGeneralSettings.namesOpacity; }
 16
 17        public override void UpdateSetting(object newValue)
 18        {
 219            float valueAsFloat = (float)newValue;
 220            currentGeneralSettings.namesOpacity = valueAsFloat;
 221            DataStore.i.HUDs.avatarNamesOpacity.Set(valueAsFloat);
 222            RaiseOnIndicatorLabelChange(valueAsFloat.ToString("0.0"));
 223        }
 24    }
 25}