Skip to content

Commit c4091fb

Browse files
committed
Add basic card back design
1 parent 522d2bd commit c4091fb

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/Card/RankedPlayCardBackSide.cs

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
using osu.Framework.Allocation;
55
using osu.Framework.Graphics;
6+
using osu.Framework.Graphics.Colour;
67
using osu.Framework.Graphics.Containers;
78
using osu.Framework.Graphics.Shapes;
9+
using osu.Framework.Graphics.Sprites;
10+
using osu.Framework.Graphics.Textures;
11+
using osu.Game.Graphics.Backgrounds;
812
using osu.Game.Overlays;
13+
using osu.Game.Screens.Menu;
14+
using osuTK;
915

1016
namespace osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay.Card
1117
{
@@ -16,16 +22,39 @@ public RankedPlayCardBackSide()
1622
Size = RankedPlayCard.SIZE;
1723
}
1824

25+
// Stops the osu logo being interactive.
26+
public override bool PropagatePositionalInputSubTree => false;
27+
1928
[BackgroundDependencyLoader]
20-
private void load(OverlayColourProvider colourProvider)
29+
private void load(OverlayColourProvider colourProvider, TextureStore textures)
2130
{
2231
Masking = true;
2332
CornerRadius = RankedPlayCard.CORNER_RADIUS;
2433

25-
InternalChild = new Box
34+
InternalChildren = new Drawable[]
2635
{
27-
RelativeSizeAxes = Axes.Both,
28-
Colour = colourProvider.Background1,
36+
new Box
37+
{
38+
RelativeSizeAxes = Axes.Both,
39+
Colour =
40+
ColourInfo.GradientVertical(
41+
colourProvider.Background3,
42+
colourProvider.Background4),
43+
},
44+
new TrianglesV2
45+
{
46+
RelativeSizeAxes = Axes.Both,
47+
Colour = colourProvider.Background4,
48+
SpawnRatio = 1.2f,
49+
Velocity = 0.1f,
50+
},
51+
new Sprite
52+
{
53+
Texture = textures.Get(@"Menu/logo"),
54+
Size = new Vector2(32),
55+
Anchor = Anchor.Centre,
56+
Origin = Anchor.Centre,
57+
},
2958
};
3059
}
3160
}

0 commit comments

Comments
 (0)