Add skin providing ruleset resources in RulesetSkinProvidingContainer

This commit is contained in:
Salman Ahmed
2021-06-11 00:25:19 +03:00
parent 2240e2c39c
commit 169c98f963
2 changed files with 61 additions and 0 deletions

View File

@ -3,8 +3,10 @@
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
@ -35,6 +37,12 @@ namespace osu.Game.Skinning
};
}
[Resolved]
private GameHost host { get; set; }
[Resolved]
private AudioManager audio { get; set; }
[Resolved]
private SkinManager skinManager { get; set; }
@ -60,6 +68,8 @@ namespace osu.Game.Skinning
SkinSources.Add(Ruleset.CreateLegacySkinProvider(skinManager.DefaultLegacySkin, Beatmap));
SkinSources.Add(Ruleset.CreateLegacySkinProvider(skinManager.DefaultSkin, Beatmap));
SkinSources.Add(new RulesetResourcesSkin(Ruleset, host, audio));
}
}
}