var vBox = new BoxContainer
{
Name = "ExaminePopupVbox",
- Orientation = LayoutOrientation.Vertical
+ Orientation = LayoutOrientation.Vertical,
+ MaxWidth = _examineTooltipOpen.MaxWidth
};
panel.AddChild(vBox);
var hBox = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
- SeparationOverride = 5
+ SeparationOverride = 5,
+ Margin = new Thickness(6, 0, 6, 0)
};
vBox.AddChild(hBox);
var spriteView = new SpriteView
{
OverrideDirection = Direction.South,
- SetSize = new Vector2(32, 32),
- Margin = new Thickness(2, 0, 2, 0),
+ SetSize = new Vector2(32, 32)
};
spriteView.SetEntity(target);
hBox.AddChild(spriteView);
if (knowTarget)
{
- hBox.AddChild(new Label
- {
- Text = Identity.Name(target, EntityManager, player),
- HorizontalExpand = true,
- });
+ var itemName = FormattedMessage.RemoveMarkup(Identity.Name(target, EntityManager, player));
+ var labelMessage = FormattedMessage.FromMarkup($"[bold]{itemName}[/bold]");
+ var label = new RichTextLabel();
+ label.SetMessage(labelMessage);
+ hBox.AddChild(label);
}
else
{
- hBox.AddChild(new Label
- {
- Text = "???",
- HorizontalExpand = true,
- });
+ var label = new RichTextLabel();
+ label.SetMessage(FormattedMessage.FromMarkup("[bold]???[/bold]"));
+ hBox.AddChild(label);
}
panel.Measure(Vector2Helpers.Infinity);
-<controls:ItemStatusPanel
+<controls:ItemStatusPanel
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Systems.Inventory.Controls"
xmlns:graphics="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
</PanelContainer.PanelOverride>
<BoxContainer Orientation="Vertical" SeparationOverride="0">
<BoxContainer Name="StatusContents" Orientation="Vertical"/>
- <Label Name="ItemNameLabel" ClipText="True" StyleClasses="ItemStatus"/>
+ <Label Name="ItemNameLabel" StyleClasses="ItemStatus"/>
</BoxContainer>
</PanelContainer>
</controls:ItemStatusPanel>