< Summary

Class:MainScripts.DCL.Controllers.SettingsDesktop.DisplaySettings
Assembly:SettingsDesktop
File(s):/tmp/workspace/explorer-desktop/unity-renderer-desktop/Assets/Scripts/MainScripts/DCL/Controllers/SettingsDesktop/DisplaySettings.cs
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:44
Line coverage:0% (0 of 5)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetFullScreenMode()0%30500%

File(s)

/tmp/workspace/explorer-desktop/unity-renderer-desktop/Assets/Scripts/MainScripts/DCL/Controllers/SettingsDesktop/DisplaySettings.cs

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4namespace MainScripts.DCL.Controllers.SettingsDesktop
 5{
 6    [Serializable]
 7    public enum WindowMode
 8    {
 9        Windowed,
 10        Borderless,
 11        FullScreen,
 12    }
 13
 14    [Serializable]
 15    public enum FpsCapMode
 16    {
 17        Max = 0,
 18        FPS30 = 30,
 19        FPS60 = 60,
 20        FPS90 = 90,
 21        FPS120 = 120,
 22        FPS144 = 144,
 23    }
 24
 25    [Serializable]
 26    public struct DisplaySettings
 27    {
 28        public WindowMode windowMode;
 29        public int resolutionSizeIndex;
 30        public bool vSync;
 31        public int fpsCapIndex;
 32
 33        public FullScreenMode GetFullScreenMode()
 34        {
 035            return windowMode switch
 36            {
 037                WindowMode.Windowed => FullScreenMode.Windowed,
 038                WindowMode.Borderless => FullScreenMode.FullScreenWindow,
 039                WindowMode.FullScreen => FullScreenMode.ExclusiveFullScreen,
 040                _ => throw new ArgumentOutOfRangeException()
 41            };
 42        }
 43    }
 44}

Methods/Properties

GetFullScreenMode()