1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00
osu-lazer/osu.Game/Screens/Select/Leaderboards/Placeholder.cs

32 lines
914 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.Screens.Select.Leaderboards
{
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;
public override bool HandleMouseInput => true;
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();
}
}