Basic UserCard implementation

This commit is contained in:
Andrei Zavatski
2020-03-04 08:41:21 +03:00
parent 72fba177bb
commit f425233527
3 changed files with 126 additions and 0 deletions

View File

@ -0,0 +1,35 @@
// 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 System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterfaceV2.Users;
using osu.Game.Users;
namespace osu.Game.Tests.Visual.UserInterface
{
public class TestSceneUserCard : OsuTestScene
{
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(UserCard),
typeof(UserGridCard),
};
public TestSceneUserCard()
{
Add(new UserGridCard(new User
{
Username = @"flyte",
Id = 3103765,
Country = new Country { FlagName = @"JP" },
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
})
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
});
}
}
}