1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 16:47:24 +08:00

Merge pull request #1945 from smoogipoo/bdl-cache-changes

Update usage of DI in-line with framework changes
This commit is contained in:
Dean Herbert 2018-01-23 14:31:05 +09:00 committed by GitHub
commit 0edcf1690b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 26c01ca6069296621f76d8ffbfe31ecf8074c687
Subproject commit a7dd1fba8473f636ee8f6e49075331d9076383ee

View File

@ -110,7 +110,7 @@ namespace osu.Game
Task.Run(() => BeatmapManager.Import(paths.ToArray()));
}
dependencies.Cache(this);
dependencies.CacheAs<OsuGame>(this);
configRuleset = LocalConfig.GetBindable<int>(OsuSetting.Ruleset);
Ruleset.Value = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First();

View File

@ -93,7 +93,7 @@ namespace osu.Game
dependencies.Cache(new LargeTextureStore(new RawTextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures"))));
dependencies.Cache(this);
dependencies.CacheAs<OsuGameBase>(this);
dependencies.Cache(LocalConfig);
runMigrations();
@ -112,7 +112,7 @@ namespace osu.Game
dependencies.Cache(new OsuColour());
//this completely overrides the framework default. will need to change once we make a proper FontStore.
dependencies.Cache(Fonts = new FontStore { ScaleAdjust = 100 }, true);
dependencies.Cache(Fonts = new FontStore { ScaleAdjust = 100 });
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/osuFont"));

View File

@ -181,7 +181,7 @@ namespace osu.Game.Screens.Select
[BackgroundDependencyLoader(permitNulls: true)]
private void load(BeatmapManager beatmaps, AudioManager audio, DialogOverlay dialog, OsuGame osu, OsuColour colours)
{
dependencies.Cache(this);
dependencies.CacheAs<SongSelect>(this);
if (Footer != null)
{