mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:03:21 +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;
|
private DrawableStoryboard storyboard;
|
||||||
protected UserDimContainer StoryboardContainer { get; private set; }
|
protected UserDimContainer StoryboardContainer { get; private set; }
|
||||||
|
|
||||||
|
private Bindable<bool> showStoryboard;
|
||||||
|
|
||||||
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
|
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -97,6 +99,7 @@ namespace osu.Game.Screens.Play
|
|||||||
sampleRestart = audio.Sample.Get(@"Gameplay/restart");
|
sampleRestart = audio.Sample.Get(@"Gameplay/restart");
|
||||||
|
|
||||||
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||||
|
showStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||||
|
|
||||||
ScoreProcessor = RulesetContainer.CreateScoreProcessor();
|
ScoreProcessor = RulesetContainer.CreateScoreProcessor();
|
||||||
if (!ScoreProcessor.Mode.Disabled)
|
if (!ScoreProcessor.Mode.Disabled)
|
||||||
@ -169,7 +172,7 @@ namespace osu.Game.Screens.Play
|
|||||||
// bind clock into components that require it
|
// bind clock into components that require it
|
||||||
RulesetContainer.IsPaused.BindTo(gameplayClockContainer.IsPaused);
|
RulesetContainer.IsPaused.BindTo(gameplayClockContainer.IsPaused);
|
||||||
|
|
||||||
if (ShowStoryboard.Value)
|
if (showStoryboard.Value)
|
||||||
initializeStoryboard(false);
|
initializeStoryboard(false);
|
||||||
|
|
||||||
// Bind ScoreProcessor to ourselves
|
// Bind ScoreProcessor to ourselves
|
||||||
@ -313,7 +316,7 @@ namespace osu.Game.Screens.Play
|
|||||||
.Delay(250)
|
.Delay(250)
|
||||||
.FadeIn(250);
|
.FadeIn(250);
|
||||||
|
|
||||||
ShowStoryboard.ValueChanged += enabled =>
|
showStoryboard.ValueChanged += enabled =>
|
||||||
{
|
{
|
||||||
if (enabled.NewValue) initializeStoryboard(true);
|
if (enabled.NewValue) initializeStoryboard(true);
|
||||||
};
|
};
|
||||||
|
@ -13,13 +13,5 @@ namespace osu.Game.Screens.Play
|
|||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap.Value);
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap.Value);
|
||||||
|
|
||||||
protected new BackgroundScreenBeatmap Background => (BackgroundScreenBeatmap)base.Background;
|
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