2023-03-06 07:17:30 +08:00
|
|
|
// 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.Skinning;
|
|
|
|
using osu.Game.Users.Drawables;
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Play.HUD
|
|
|
|
{
|
|
|
|
public partial class PlayerFlag : CompositeDrawable, ISerialisableDrawable
|
|
|
|
{
|
2023-11-22 02:27:33 +08:00
|
|
|
private readonly BaseUpdateableFlag flag;
|
2023-03-06 07:17:30 +08:00
|
|
|
|
2023-03-07 16:00:10 +08:00
|
|
|
private const float default_size = 40f;
|
|
|
|
|
2023-03-06 07:17:30 +08:00
|
|
|
public PlayerFlag()
|
|
|
|
{
|
2023-03-07 16:00:10 +08:00
|
|
|
Size = new Vector2(default_size, default_size / 1.4f);
|
2023-11-22 02:27:33 +08:00
|
|
|
InternalChild = flag = new BaseUpdateableFlag
|
2023-03-06 07:17:30 +08:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-03-07 16:01:29 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(GameplayState gameplayState)
|
2023-03-06 07:17:30 +08:00
|
|
|
{
|
|
|
|
flag.CountryCode = gameplayState.Score.ScoreInfo.User.CountryCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool UsesFixedAnchor { get; set; }
|
|
|
|
}
|
|
|
|
}
|