1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 16:42:55 +08:00
osu-lazer/osu.Game/Online/Placeholders/Placeholder.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
892 B
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
2017-12-22 21:44:18 +08:00
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.Placeholders
2017-12-22 21:44:18 +08:00
{
2018-06-28 12:04:39 +08:00
public abstract partial class Placeholder : OsuTextFlowContainer, IEquatable<Placeholder>
2017-12-22 21:44:18 +08:00
{
2018-06-28 12:04:39 +08:00
protected const float TEXT_SIZE = 22;
2017-12-22 21:44:18 +08:00
protected Placeholder()
: base(cp => cp.Font = cp.Font.With(size: TEXT_SIZE))
2017-12-22 21:44:18 +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;
2017-12-22 21:44:18 +08:00
}
2018-04-13 17:19:50 +08:00
2017-12-22 21:44:18 +08:00
public virtual bool Equals(Placeholder other) => GetType() == other?.GetType();
}
}