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