mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:53:01 +08:00
Move DifficultyRecommender to OsuGameBase
This commit is contained in:
parent
ecd40072c4
commit
dd6c9173da
@ -33,6 +33,7 @@ using osu.Game.Resources;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK.Input;
|
||||
|
||||
@ -240,6 +241,10 @@ namespace osu.Game
|
||||
dependencies.Cache(previewTrackManager = new PreviewTrackManager());
|
||||
Add(previewTrackManager);
|
||||
|
||||
DifficultyRecommender difficultyRecommender;
|
||||
dependencies.Cache(difficultyRecommender = new DifficultyRecommender());
|
||||
Add(difficultyRecommender);
|
||||
|
||||
Ruleset.BindValueChanged(onRulesetChanged);
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,6 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
protected BeatmapCarousel Carousel { get; private set; }
|
||||
|
||||
private DifficultyRecommender recommender;
|
||||
|
||||
private BeatmapInfoWedge beatmapInfoWedge;
|
||||
private DialogOverlay dialogOverlay;
|
||||
|
||||
@ -104,14 +102,13 @@ namespace osu.Game.Screens.Select
|
||||
private MusicController music { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(AudioManager audio, DialogOverlay dialog, OsuColour colours, SkinManager skins, ScoreManager scores)
|
||||
private void load(AudioManager audio, DialogOverlay dialog, OsuColour colours, SkinManager skins, ScoreManager scores, DifficultyRecommender recommender)
|
||||
{
|
||||
// initial value transfer is required for FilterControl (it uses our re-cached bindables in its async load for the initial filter).
|
||||
transferRulesetValue();
|
||||
|
||||
AddRangeInternal(new Drawable[]
|
||||
{
|
||||
recommender = new DifficultyRecommender(),
|
||||
new ResetScrollContainer(() => Carousel.ScrollToSelected())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
|
Loading…
Reference in New Issue
Block a user