Move placeholders to a dedicated namespace

This commit is contained in:
Lucas A
2020-01-04 18:26:31 +01:00
parent 9f5f78e443
commit 3bd3ebad49
5 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,29 @@
// 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 System;
using osu.Framework.Graphics;
using osu.Game.Graphics.Containers;
namespace osu.Game.Online.Placeholders
{
public abstract class Placeholder : OsuTextFlowContainer, IEquatable<Placeholder>
{
protected const float TEXT_SIZE = 22;
protected Placeholder()
: base(cp => cp.Font = cp.Font.With(size: 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();
}
}