mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Add a setting to hide storyboards.
This commit is contained in:
@ -54,6 +54,8 @@ namespace osu.Game.Configuration
|
|||||||
// Graphics
|
// Graphics
|
||||||
Set(OsuSetting.ShowFpsDisplay, false);
|
Set(OsuSetting.ShowFpsDisplay, false);
|
||||||
|
|
||||||
|
Set(OsuSetting.ShowStoryboard, true);
|
||||||
|
|
||||||
Set(OsuSetting.MenuParallax, true);
|
Set(OsuSetting.MenuParallax, true);
|
||||||
|
|
||||||
Set(OsuSetting.SnakingInSliders, true);
|
Set(OsuSetting.SnakingInSliders, true);
|
||||||
@ -87,6 +89,7 @@ namespace osu.Game.Configuration
|
|||||||
GameplayCursorSize,
|
GameplayCursorSize,
|
||||||
AutoCursorSize,
|
AutoCursorSize,
|
||||||
DimLevel,
|
DimLevel,
|
||||||
|
ShowStoryboard,
|
||||||
KeyOverlay,
|
KeyOverlay,
|
||||||
FloatingComments,
|
FloatingComments,
|
||||||
PlaybackSpeed,
|
PlaybackSpeed,
|
||||||
|
@ -1,10 +1,27 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||||
{
|
{
|
||||||
public class DetailSettings : SettingsSubsection
|
public class DetailSettings : SettingsSubsection
|
||||||
{
|
{
|
||||||
protected override string Header => "Detail Settings";
|
protected override string Header => "Detail Settings";
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuConfigManager config)
|
||||||
|
{
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new SettingsCheckbox
|
||||||
|
{
|
||||||
|
LabelText = "Storyboards",
|
||||||
|
Bindable = config.GetBindable<bool>(OsuSetting.ShowStoryboard)
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,7 @@ namespace osu.Game.Screens.Play
|
|||||||
#region User Settings
|
#region User Settings
|
||||||
|
|
||||||
private Bindable<double> dimLevel;
|
private Bindable<double> dimLevel;
|
||||||
|
private Bindable<bool> showStoryboard;
|
||||||
private Bindable<bool> mouseWheelDisabled;
|
private Bindable<bool> mouseWheelDisabled;
|
||||||
private Bindable<double> userAudioOffset;
|
private Bindable<double> userAudioOffset;
|
||||||
|
|
||||||
@ -82,6 +83,7 @@ namespace osu.Game.Screens.Play
|
|||||||
this.api = api;
|
this.api = api;
|
||||||
|
|
||||||
dimLevel = config.GetBindable<double>(OsuSetting.DimLevel);
|
dimLevel = config.GetBindable<double>(OsuSetting.DimLevel);
|
||||||
|
showStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||||
|
|
||||||
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||||
|
|
||||||
@ -213,6 +215,7 @@ namespace osu.Game.Screens.Play
|
|||||||
storyboardUsesBackground = beatmap.StoryboardUsesBackground;
|
storyboardUsesBackground = beatmap.StoryboardUsesBackground;
|
||||||
storyboard.Width = storyboard.Height * beatmap.BeatmapInfo.StoryboardAspect;
|
storyboard.Width = storyboard.Height * beatmap.BeatmapInfo.StoryboardAspect;
|
||||||
storyboard.Masking = true;
|
storyboard.Masking = true;
|
||||||
|
storyboard.Alpha = showStoryboard ? 1 : 0;
|
||||||
|
|
||||||
hudOverlay.BindProcessor(scoreProcessor);
|
hudOverlay.BindProcessor(scoreProcessor);
|
||||||
hudOverlay.BindRulesetContainer(RulesetContainer);
|
hudOverlay.BindRulesetContainer(RulesetContainer);
|
||||||
@ -285,8 +288,9 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
(Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, Easing.OutQuint);
|
(Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, Easing.OutQuint);
|
||||||
|
|
||||||
applyDim();
|
dimLevel.ValueChanged += value => updateBackgroundElements();
|
||||||
dimLevel.ValueChanged += newDim => applyDim();
|
showStoryboard.ValueChanged += value => updateBackgroundElements();
|
||||||
|
updateBackgroundElements();
|
||||||
|
|
||||||
Content.Alpha = 0;
|
Content.Alpha = 0;
|
||||||
Content
|
Content
|
||||||
@ -327,13 +331,13 @@ namespace osu.Game.Screens.Play
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyDim()
|
private void updateBackgroundElements()
|
||||||
{
|
{
|
||||||
var opacity = 1 - (float)dimLevel;
|
var opacity = 1 - (float)dimLevel;
|
||||||
storyboard.FadeColour(new Color4(opacity, opacity, opacity, 1), 800);
|
storyboard.FadeColour(new Color4(opacity, opacity, opacity, 1), 800);
|
||||||
storyboard.FadeTo(opacity == 0 ? 0 : 1);
|
storyboard.FadeTo(!showStoryboard || opacity == 0 ? 0 : 1, 800);
|
||||||
|
|
||||||
Background?.FadeTo(storyboardUsesBackground ? 0 : opacity, 800, Easing.OutQuint);
|
Background?.FadeTo(showStoryboard && storyboardUsesBackground ? 0 : opacity, 800, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fadeOut()
|
private void fadeOut()
|
||||||
|
Reference in New Issue
Block a user