1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

implemented GetFrameworkConfigDefaults for overriding framework default, removed previous code that added a new OsuSetting and modified settings layout.

This commit is contained in:
Owen Young 2021-03-22 23:36:55 -05:00
parent 9f788f5854
commit d9e2c44a34
4 changed files with 8 additions and 18 deletions

View File

@ -91,8 +91,6 @@ namespace osu.Game.Configuration
Set(OsuSetting.MenuParallax, true);
Set(OsuSetting.WindowSetting, WindowMode.Fullscreen);
// Gameplay
Set(OsuSetting.DimLevel, 0.8, 0, 1, 0.01);
Set(OsuSetting.BlurLevel, 0, 0, 1, 0.01);
@ -235,7 +233,6 @@ namespace osu.Game.Configuration
MenuVoice,
CursorRotation,
MenuParallax,
WindowSetting,
BeatmapDetailTab,
BeatmapDetailModsFilter,
Username,

View File

@ -126,8 +126,6 @@ namespace osu.Game
private Bindable<int> configSkin;
// private Bindable<WindowMode> windowMode;
private readonly string[] args;
private readonly List<OverlayContainer> overlays = new List<OverlayContainer>();
@ -573,9 +571,6 @@ namespace osu.Game
dependencies.CacheAs(idleTracker = new GameIdleTracker(6000));
// windowMode = LocalConfig.GetBindable<WindowMode>(OsuSetting.WindowSetting);
// frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode).Value = windowMode.Value;
AddRange(new Drawable[]
{
new VolumeControlReceptor
@ -1012,5 +1007,11 @@ namespace osu.Game
if (newScreen == null)
Exit();
}
protected override IDictionary<FrameworkSetting, object> GetFrameworkConfigDefaults() {
IDictionary<FrameworkSetting, object> defaultOverrides = new Dictionary<FrameworkSetting, object>();
defaultOverrides.Add(FrameworkSetting.WindowMode, WindowMode.Fullscreen);
return defaultOverrides;
}
}
}

View File

@ -21,7 +21,6 @@ using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.Cursor;
using osu.Game.Online.API;
using osu.Framework.Configuration;
using osu.Framework.Graphics.Performance;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input;

View File

@ -12,7 +12,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Localisation;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
@ -32,7 +31,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private Bindable<ScalingMode> scalingMode;
private Bindable<Size> sizeFullscreen;
private Bindable<WindowMode> windowMode;
private readonly BindableList<Size> resolutions = new BindableList<Size>(new[] { new Size(9999, 9999) });
@ -58,8 +56,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
scalingSizeY = osuConfig.GetBindable<float>(OsuSetting.ScalingSizeY);
scalingPositionX = osuConfig.GetBindable<float>(OsuSetting.ScalingPositionX);
scalingPositionY = osuConfig.GetBindable<float>(OsuSetting.ScalingPositionY);
windowMode = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
Logger.Log($"windowMode {windowMode.Value}");
if (host.Window != null)
{
@ -73,7 +69,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
{
LabelText = "Screen mode",
ItemSource = windowModes,
Current = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode)
Current = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode),
},
resolutionDropdown = new ResolutionSettingsDropdown
{
@ -145,10 +141,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
windowModeDropdown.Current.ValueChanged += mode => {
windowMode.Value = mode.NewValue;
updateResolutionDropdown();
};
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
windowModes.BindCollectionChanged((sender, args) =>
{