mirror of
https://github.com/ppy/osu
synced 2024-12-16 11:56:31 +00:00
Added WindowSetting setting to OsuSetting enum so that it can be set by default at startup. Modified LayoutSettings.cs so that when it is changed in the settings, it is written to the local settings as well.
This commit is contained in:
parent
f7bf23dbe9
commit
fc632fd48a
@ -91,6 +91,8 @@ 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);
|
||||
@ -233,6 +235,7 @@ namespace osu.Game.Configuration
|
||||
MenuVoice,
|
||||
CursorRotation,
|
||||
MenuParallax,
|
||||
WindowSetting,
|
||||
BeatmapDetailTab,
|
||||
BeatmapDetailModsFilter,
|
||||
Username,
|
||||
|
@ -234,6 +234,9 @@ namespace osu.Game
|
||||
|
||||
SelectedMods.BindValueChanged(modsChanged);
|
||||
Beatmap.BindValueChanged(beatmapChanged, true);
|
||||
|
||||
windowMode = LocalConfig.GetBindable<WindowMode>(OsuSetting.WindowSetting);
|
||||
frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode).Value = windowMode.Value;
|
||||
}
|
||||
|
||||
private ExternalLinkOpener externalLinkOpener;
|
||||
@ -633,12 +636,6 @@ namespace osu.Game
|
||||
|
||||
loadComponentSingleFile(volume = new VolumeOverlay(), leftFloatingOverlayContent.Add, true);
|
||||
|
||||
frameworkConfig.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
|
||||
windowMode.BindValueChanged(mode => ScheduleAfterChildren(() =>
|
||||
{
|
||||
windowMode.Value = WindowMode.Windowed;
|
||||
}), true);
|
||||
|
||||
var onScreenDisplay = new OnScreenDisplay();
|
||||
|
||||
onScreenDisplay.BeginTracking(this, frameworkConfig);
|
||||
|
@ -31,6 +31,7 @@ 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) });
|
||||
|
||||
@ -56,6 +57,7 @@ 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 = osuConfig.GetBindable<WindowMode>(OsuSetting.WindowSetting);
|
||||
|
||||
if (host.Window != null)
|
||||
{
|
||||
@ -141,7 +143,10 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
|
||||
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
|
||||
|
||||
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
|
||||
windowModeDropdown.Current.ValueChanged += mode => {
|
||||
windowMode.Value = mode.NewValue;
|
||||
updateResolutionDropdown();
|
||||
};
|
||||
|
||||
windowModes.BindCollectionChanged((sender, args) =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user