2019-01-24 08:43:03 +00: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 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
2019-03-27 10:29:27 +00:00
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2020-01-04 17:26:31 +00:00
|
|
|
|
namespace osu.Game.Online.Placeholders
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
|
|
|
|
public class MessagePlaceholder : Placeholder
|
|
|
|
|
{
|
|
|
|
|
private readonly string message;
|
|
|
|
|
|
|
|
|
|
public MessagePlaceholder(string message)
|
|
|
|
|
{
|
2019-04-02 10:55:24 +00:00
|
|
|
|
AddIcon(FontAwesome.Solid.ExclamationCircle, cp =>
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2019-02-20 10:32:30 +00:00
|
|
|
|
cp.Font = cp.Font.With(size: TEXT_SIZE);
|
2018-06-28 04:04:39 +00:00
|
|
|
|
cp.Padding = new MarginPadding { Right = 10 };
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AddText(this.message = message);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool Equals(Placeholder other) => (other as MessagePlaceholder)?.message == message;
|
|
|
|
|
}
|
|
|
|
|
}
|