2022-01-13 06:28:17 -08:00
|
|
|
|
using Content.Client.ContextMenu.UI;
|
|
|
|
|
|
using Content.Shared.Verbs;
|
|
|
|
|
|
using Robust.Shared.Maths;
|
|
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Verbs.UI;
|
|
|
|
|
|
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed partial class ConfirmationMenuElement : ContextMenuElement
|
2022-01-13 06:28:17 -08:00
|
|
|
|
{
|
|
|
|
|
|
public const string StyleClassConfirmationContextMenuButton = "confirmationContextMenuButton";
|
|
|
|
|
|
|
|
|
|
|
|
public readonly Verb Verb;
|
|
|
|
|
|
|
|
|
|
|
|
public override string Text
|
|
|
|
|
|
{
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
var message = new FormattedMessage();
|
|
|
|
|
|
message.PushColor(Color.White);
|
|
|
|
|
|
message.AddMarkupPermissive(value.Trim());
|
|
|
|
|
|
Label.SetMessage(message);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-02-10 15:30:59 +13:00
|
|
|
|
public ConfirmationMenuElement(Verb verb, string? text) : base(text)
|
2022-01-13 06:28:17 -08:00
|
|
|
|
{
|
|
|
|
|
|
Verb = verb;
|
|
|
|
|
|
Icon.Visible = false;
|
|
|
|
|
|
|
|
|
|
|
|
SetOnlyStyleClass(StyleClassConfirmationContextMenuButton);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|