1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 03:43:21 +08:00

Make OsuScreen.Ruleset protected.

This commit is contained in:
Huo Yaoyuan 2017-07-24 21:47:31 +08:00
parent e0b1057b87
commit c2e5788ed1
2 changed files with 4 additions and 5 deletions

View File

@ -47,7 +47,7 @@ namespace osu.Game.Screens
}
}
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
protected readonly Bindable<RulesetInfo> Ruleset = new Bindable<RulesetInfo>();
private SampleChannel sampleExit;
@ -64,7 +64,7 @@ namespace osu.Game.Screens
}
if (osuGame != null)
ruleset.BindTo(osuGame.Ruleset);
Ruleset.BindTo(osuGame.Ruleset);
sampleExit = audio.Sample.Get(@"UI/melodic-1");
}
@ -77,7 +77,7 @@ namespace osu.Game.Screens
{
// we only want to apply these restrictions when we are inside a screen stack.
// the use case for not applying is in visual/unit tests.
ruleset.Disabled = !AllowBeatmapRulesetChange;
Ruleset.Disabled = !AllowBeatmapRulesetChange;
Beatmap.Disabled = !AllowBeatmapRulesetChange;
}
}

View File

@ -27,7 +27,6 @@ namespace osu.Game.Screens.Select
{
public abstract class SongSelect : OsuScreen
{
protected readonly Bindable<RulesetInfo> Ruleset = new Bindable<RulesetInfo>();
private BeatmapDatabase database;
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap();
@ -251,7 +250,7 @@ namespace osu.Game.Screens.Select
}
else
{
ruleset.Value = beatmap.Ruleset;
Ruleset.Value = beatmap.Ruleset;
if (beatmap.BeatmapSetInfoID == beatmapNoDebounce?.BeatmapSetInfoID)
sampleChangeDifficulty.Play();