1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 22:22:54 +08:00
osu-lazer/osu.Game/Online/Leaderboards/Placeholder.cs

30 lines
850 B
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Graphics;
2018-06-28 12:04:39 +08:00
using osu.Game.Graphics.Containers;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Online.Leaderboards
2018-04-13 17:19:50 +08:00
{
2018-06-28 12:04:39 +08:00
public abstract class Placeholder : OsuTextFlowContainer, IEquatable<Placeholder>
2018-04-13 17:19:50 +08:00
{
2018-06-28 12:04:39 +08:00
protected const float TEXT_SIZE = 22;
2018-04-13 17:19:50 +08:00
protected Placeholder()
2018-06-28 12:04:39 +08:00
: base(cp => cp.TextSize = TEXT_SIZE)
2018-04-13 17:19:50 +08:00
{
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
2018-06-28 12:04:39 +08:00
TextAnchor = Anchor.TopCentre;
Padding = new MarginPadding(20);
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
2018-04-13 17:19:50 +08:00
}
public virtual bool Equals(Placeholder other) => GetType() == other?.GetType();
}
}