2019-01-24 16:43:03 +08:00
|
|
|
|
// 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
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
|
2018-12-14 18:51:27 +08:00
|
|
|
|
namespace osu.Game.Online.Leaderboards
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
public class MessagePlaceholder : Placeholder
|
|
|
|
|
{
|
|
|
|
|
private readonly string message;
|
|
|
|
|
|
|
|
|
|
public MessagePlaceholder(string message)
|
|
|
|
|
{
|
2018-06-28 12:04:39 +08:00
|
|
|
|
AddIcon(FontAwesome.fa_exclamation_circle, cp =>
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-02-12 12:04:46 +08:00
|
|
|
|
cp.Font = OsuFont.GetFont(cp.Font, size: TEXT_SIZE);
|
2018-06-28 12:04:39 +08:00
|
|
|
|
cp.Padding = new MarginPadding { Right = 10 };
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AddText(this.message = message);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(Placeholder other) => (other as MessagePlaceholder)?.message == message;
|
|
|
|
|
}
|
|
|
|
|
}
|