1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 10:02:59 +08:00

Set up test scene and basic LeaderBoardScoreV2.cs shape

This commit is contained in:
mk56-spn 2023-01-16 16:57:18 +01:00
parent 4224907f08
commit c907751a5c
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,26 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Leaderboards;
namespace osu.Game.Tests.Visual.SongSelect
{
public partial class TestSceneLeaderboardScoreV2 : OsuTestScene
{
[BackgroundDependencyLoader]
private void load()
{
Child = new Container
{
Width = 900,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.Y,
Child = new LeaderBoardScoreV2()
};
}
}
}

View File

@ -0,0 +1,43 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Online.Leaderboards
{
public partial class LeaderBoardScoreV2 : OsuClickableContainer
{
private const int HEIGHT = 60;
private const int corner_radius = 10;
private static readonly Vector2 shear = new Vector2(0.15f, 0);
private Container content = null!;
[BackgroundDependencyLoader]
private void load()
{
Shear = shear;
RelativeSizeAxes = Axes.X;
Height = HEIGHT;
Child = content = new Container
{
Masking = true,
CornerRadius = corner_radius,
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
}
}
};
}
}
}