1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-30 22:22:55 +08:00
osu-lazer/osu.Game/Online/Placeholders/MessagePlaceholder.cs

30 lines
891 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
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Online.Placeholders
2018-04-13 17:19:50 +08:00
{
2022-11-24 13:32:20 +08:00
public partial class MessagePlaceholder : Placeholder
2018-04-13 17:19:50 +08:00
{
private readonly LocalisableString message;
2018-04-13 17:19:50 +08:00
public MessagePlaceholder(LocalisableString message)
2018-04-13 17:19:50 +08:00
{
2019-04-02 18:55:24 +08:00
AddIcon(FontAwesome.Solid.ExclamationCircle, cp =>
2018-04-13 17:19:50 +08:00
{
cp.Font = cp.Font.With(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;
}
}