mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:47:51 +08:00
Move showstoryboard into player
This commit is contained in:
parent
27a92e017c
commit
df37973e84
@ -73,6 +73,8 @@ namespace osu.Game.Screens.Play
|
||||
private DrawableStoryboard storyboard;
|
||||
protected UserDimContainer StoryboardContainer { get; private set; }
|
||||
|
||||
private Bindable<bool> showStoryboard;
|
||||
|
||||
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -97,6 +99,7 @@ namespace osu.Game.Screens.Play
|
||||
sampleRestart = audio.Sample.Get(@"Gameplay/restart");
|
||||
|
||||
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||
showStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||
|
||||
ScoreProcessor = RulesetContainer.CreateScoreProcessor();
|
||||
if (!ScoreProcessor.Mode.Disabled)
|
||||
@ -169,7 +172,7 @@ namespace osu.Game.Screens.Play
|
||||
// bind clock into components that require it
|
||||
RulesetContainer.IsPaused.BindTo(gameplayClockContainer.IsPaused);
|
||||
|
||||
if (ShowStoryboard.Value)
|
||||
if (showStoryboard.Value)
|
||||
initializeStoryboard(false);
|
||||
|
||||
// Bind ScoreProcessor to ourselves
|
||||
@ -313,7 +316,7 @@ namespace osu.Game.Screens.Play
|
||||
.Delay(250)
|
||||
.FadeIn(250);
|
||||
|
||||
ShowStoryboard.ValueChanged += enabled =>
|
||||
showStoryboard.ValueChanged += enabled =>
|
||||
{
|
||||
if (enabled.NewValue) initializeStoryboard(true);
|
||||
};
|
||||
|
@ -13,13 +13,5 @@ namespace osu.Game.Screens.Play
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap.Value);
|
||||
|
||||
protected new BackgroundScreenBeatmap Background => (BackgroundScreenBeatmap)base.Background;
|
||||
|
||||
protected Bindable<bool> ShowStoryboard;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
ShowStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user