Remove masking from Triangles to simplify OsuLogo masking hierarchy.

This commit is contained in:
Dean Herbert 2016-12-01 21:12:37 +09:00
parent 4b74ea7586
commit 511dab32ef
3 changed files with 12 additions and 24 deletions

View File

@ -19,7 +19,6 @@ public class Triangles : Container
public Triangles()
{
Masking = true;
Alpha = 0.3f;
}

View File

@ -156,6 +156,7 @@ public class OpaqueBackground : Container
public OpaqueBackground()
{
RelativeSizeAxes = Axes.Both;
Masking = true;
Children = new Drawable[]
{

View File

@ -29,7 +29,7 @@ public partial class OsuLogo : BufferedContainer
private Container logoHoverContainer;
private MenuVisualisation vis;
private CircularContainer colourAndTriangles;
private Container colourAndTriangles;
public Action Action;
@ -84,14 +84,14 @@ public OsuLogo()
{
logoContainer = new CircularContainer
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
Scale = new Vector2(0.8f),
Children = new Drawable[]
{
colourAndTriangles = new CircularContainer
colourAndTriangles = new Container
{
RelativeSizeAxes = Axes.Both,
Scale = new Vector2(0.78f),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
@ -107,14 +107,15 @@ public OsuLogo()
},
}
},
logo = new Sprite
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(0.5f),
},
},
},
logo = new Sprite
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Scale = new Vector2(0.5f),
},
rippleContainer = new Container
{
Anchor = Anchor.Centre,
@ -205,19 +206,6 @@ public OsuLogoTriangles()
Alpha = 1;
}
public override float CornerRadius
{
get
{
return DrawSize.X / 2f;
}
set
{
Debug.Assert(false, "Cannot manually set CornerRadius of CircularContainer.");
}
}
protected override Sprite CreateTriangle()
{
var triangle = base.CreateTriangle();