Hover examine buttons (#35206)
* hover examine verbs (not aligned to the left yet) * handle click hovers and align them to the left * revert contrabandsystem changes (this is for another PR) * add support for markup tags
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Shared.Verbs;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -40,7 +41,17 @@ public sealed class ExamineButton : ContainerButton
|
||||
Disabled = true;
|
||||
}
|
||||
|
||||
ToolTip = verb.Message ?? verb.Text;
|
||||
TooltipSupplier = sender =>
|
||||
{
|
||||
var label = new RichTextLabel();
|
||||
label.SetMessage(FormattedMessage.FromMarkupOrThrow(verb.Message ?? verb.Text));
|
||||
|
||||
var tooltip = new Tooltip();
|
||||
tooltip.GetChild(0).Children.Clear();
|
||||
tooltip.GetChild(0).Children.Add(label);
|
||||
|
||||
return tooltip;
|
||||
};
|
||||
|
||||
Icon = new TextureRect
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user