mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 02:03:51 +08:00
32 lines
914 B
C#
32 lines
914 B
C#
// 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;
|
|
using osu.Game.Graphics.Containers;
|
|
|
|
namespace osu.Game.Screens.Select.Leaderboards
|
|
{
|
|
public abstract class Placeholder : OsuTextFlowContainer, IEquatable<Placeholder>
|
|
{
|
|
protected const float TEXT_SIZE = 22;
|
|
|
|
public override bool HandleMouseInput => true;
|
|
|
|
protected Placeholder()
|
|
: base(cp => cp.TextSize = TEXT_SIZE)
|
|
{
|
|
Anchor = Anchor.Centre;
|
|
Origin = Anchor.Centre;
|
|
TextAnchor = Anchor.TopCentre;
|
|
|
|
Padding = new MarginPadding(20);
|
|
|
|
AutoSizeAxes = Axes.Y;
|
|
RelativeSizeAxes = Axes.X;
|
|
}
|
|
|
|
public virtual bool Equals(Placeholder other) => GetType() == other?.GetType();
|
|
}
|
|
}
|