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

derives from trianglebutton rather than osubutton

This commit is contained in:
Santeri 2017-11-28 00:09:58 +02:00
parent 0a8fa2e6de
commit 86de6f8252
3 changed files with 8 additions and 16 deletions

View File

@ -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 },
},
},
};
});
}
}
}

View File

@ -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 =>
{

View File

@ -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<Drawable> 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;
}
}