From 86de6f8252d52a5f7d327fda28484dbe371813e6 Mon Sep 17 00:00:00 2001 From: Santeri Date: Tue, 28 Nov 2017 00:09:58 +0200 Subject: [PATCH] derives from trianglebutton rather than osubutton --- osu.Game/Overlays/BeatmapSet/DownloadButton.cs | 4 ++-- osu.Game/Overlays/BeatmapSet/FavouriteButton.cs | 4 ++-- osu.Game/Overlays/BeatmapSet/HeaderButton.cs | 16 ++++------------ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/DownloadButton.cs b/osu.Game/Overlays/BeatmapSet/DownloadButton.cs index b256f82a22..47787d2ced 100644 --- a/osu.Game/Overlays/BeatmapSet/DownloadButton.cs +++ b/osu.Game/Overlays/BeatmapSet/DownloadButton.cs @@ -15,7 +15,7 @@ namespace osu.Game.Overlays.BeatmapSet { Width = 120; - Child = new Container + Add(new Container { Depth = -1, RelativeSizeAxes = Axes.Both, @@ -53,7 +53,7 @@ namespace osu.Game.Overlays.BeatmapSet Margin = new MarginPadding { Right = 5 }, }, }, - }; + }); } } } diff --git a/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs b/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs index af4c56c614..77be4da5f8 100644 --- a/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs +++ b/osu.Game/Overlays/BeatmapSet/FavouriteButton.cs @@ -20,7 +20,7 @@ namespace osu.Game.Overlays.BeatmapSet Container pink; SpriteIcon icon; - Children = new Drawable[] + AddRange(new Drawable[] { pink = new Container { @@ -52,7 +52,7 @@ namespace osu.Game.Overlays.BeatmapSet Size = new Vector2(18), Shadow = false, }, - }; + }); Favourited.ValueChanged += value => { diff --git a/osu.Game/Overlays/BeatmapSet/HeaderButton.cs b/osu.Game/Overlays/BeatmapSet/HeaderButton.cs index 2296a4e8c0..6c7edb252e 100644 --- a/osu.Game/Overlays/BeatmapSet/HeaderButton.cs +++ b/osu.Game/Overlays/BeatmapSet/HeaderButton.cs @@ -13,21 +13,13 @@ using osu.Framework.Allocation; namespace osu.Game.Overlays.BeatmapSet { - public class HeaderButton : OsuButton + public class HeaderButton : TriangleButton { - private readonly Container content; - - protected override Container Content => content; public HeaderButton() { Height = 0; RelativeSizeAxes = Axes.Y; - - AddInternal(content = new Container - { - RelativeSizeAxes = Axes.Both - }); } [BackgroundDependencyLoader] @@ -36,9 +28,9 @@ namespace osu.Game.Overlays.BeatmapSet Masking = true; CornerRadius = 3; BackgroundColour = OsuColour.FromHex(@"094c5f"); - this.Triangles.ColourLight = OsuColour.FromHex(@"0f7c9b"); - this.Triangles.ColourDark = OsuColour.FromHex(@"094c5f"); - this.Triangles.TriangleScale = 1.5f; + Triangles.ColourLight = OsuColour.FromHex(@"0f7c9b"); + Triangles.ColourDark = OsuColour.FromHex(@"094c5f"); + Triangles.TriangleScale = 1.5f; } }