Convert everything to DI pattern

This commit is contained in:
Drew DeVault
2016-11-08 18:13:20 -05:00
parent dc03f36793
commit ee24cd310c
44 changed files with 233 additions and 224 deletions

View File

@ -4,9 +4,11 @@
using OpenTK;
using OpenTK.Graphics;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Graphics.UserInterface
{
@ -59,20 +61,20 @@ namespace osu.Game.Graphics.UserInterface
Name = name;
}
protected override void Load(BaseGame game)
[Initializer]
private void Load(TextureStore textures)
{
base.Load(game);
Children = new Drawable[]
{
buttonSprite = new Sprite
{
Texture = game.Textures.Get(@"KeyCounter/key-up"),
Texture = textures.Get(@"KeyCounter/key-up"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
glowSprite = new Sprite
{
Texture = game.Textures.Get(@"KeyCounter/key-glow"),
Texture = textures.Get(@"KeyCounter/key-glow"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Alpha = 0