Make triangles opaque.

This commit is contained in:
Dean Herbert
2017-01-30 16:53:12 +09:00
parent a315db68ab
commit f0d30cc873
3 changed files with 17 additions and 43 deletions

View File

@ -27,6 +27,7 @@ namespace osu.Game.Beatmaps.Drawables
public Action<BeatmapPanel> GainedSelection;
public Action<BeatmapPanel> StartRequested;
private Triangles triangles;
protected override void Selected()
{
@ -36,6 +37,8 @@ namespace osu.Game.Beatmaps.Drawables
background.ColourInfo = ColourInfo.GradientVertical(
new Color4(20, 43, 51, 255),
new Color4(40, 86, 102, 255));
triangles.Colour = Color4.White;
}
protected override void Deselected()
@ -43,6 +46,7 @@ namespace osu.Game.Beatmaps.Drawables
base.Deselected();
background.Colour = new Color4(20, 43, 51, 255);
triangles.Colour = OsuColour.Gray(0.5f);
}
protected override bool OnClick(InputState state)
@ -64,15 +68,11 @@ namespace osu.Game.Beatmaps.Drawables
{
RelativeSizeAxes = Axes.Both,
},
new Triangles
triangles = new Triangles
{
// The border is drawn in the shader of the children. Being additive, triangles would over-emphasize
// the border wherever they cross it, and thus they get their own masking container without a border.
Masking = true,
CornerRadius = Content.CornerRadius,
RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive,
Colour = new Color4(20, 43, 51, 255),
ColourLight = OsuColour.FromHex(@"3a7285"),
ColourDark = OsuColour.FromHex(@"123744")
},
new FlowContainer
{