2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-12-22 21:44:18 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
using OpenTK;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Select.Leaderboards
|
|
|
|
|
{
|
|
|
|
|
public class MessagePlaceholder : Placeholder
|
|
|
|
|
{
|
|
|
|
|
private readonly string message;
|
|
|
|
|
|
|
|
|
|
public MessagePlaceholder(string message)
|
|
|
|
|
{
|
|
|
|
|
Direction = FillDirection.Horizontal;
|
|
|
|
|
AutoSizeAxes = Axes.Both;
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new SpriteIcon
|
|
|
|
|
{
|
|
|
|
|
Icon = FontAwesome.fa_exclamation_circle,
|
|
|
|
|
Size = new Vector2(26),
|
|
|
|
|
Margin = new MarginPadding { Right = 10 },
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Text = this.message = message,
|
|
|
|
|
TextSize = 22,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(Placeholder other) => (other as MessagePlaceholder)?.message == message;
|
|
|
|
|
}
|
|
|
|
|
}
|