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:
parent
e0b1057b87
commit
c2e5788ed1
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user