From 24b3b10942bca6ef24e531e4e1a12adbc57be3c9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 7 Dec 2017 20:44:55 +0900 Subject: [PATCH] Move drawable assignment to load, remove depth overrides --- osu.Game/Overlays/BeatmapSet/FavouriteButton.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs b/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs index 77be4da5f8..1b22853656 100644 --- a/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs +++ b/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -15,16 +16,15 @@ namespace osu.Game.Overlays.BeatmapSet { public readonly Bindable Favourited = new Bindable(); - public FavouriteButton() + [BackgroundDependencyLoader] + private void load() { - Container pink; SpriteIcon icon; AddRange(new Drawable[] { pink = new Container { - Depth = -1, RelativeSizeAxes = Axes.Both, Alpha = 0f, Children = new Drawable[] @@ -45,7 +45,6 @@ namespace osu.Game.Overlays.BeatmapSet }, icon = new SpriteIcon { - Depth = -1, Anchor = Anchor.Centre, Origin = Anchor.Centre, Icon = FontAwesome.fa_heart_o,