Add utility verbs (#6473)
This commit is contained in:
@@ -41,6 +41,18 @@ namespace Content.Client.Verbs.UI
|
||||
ExpansionIndicator.Visible = true;
|
||||
}
|
||||
|
||||
if (verb.Icon == null && verb.IconEntity != null)
|
||||
{
|
||||
var spriteView = new SpriteView()
|
||||
{
|
||||
OverrideDirection = Direction.South,
|
||||
Sprite = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ISpriteComponent>(verb.IconEntity.Value)
|
||||
};
|
||||
|
||||
Icon.AddChild(spriteView);
|
||||
return;
|
||||
}
|
||||
|
||||
Icon.AddChild(new TextureRect()
|
||||
{
|
||||
Texture = verb.Icon?.Frame0(),
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Content.Client.Verbs.UI
|
||||
if (verb.Category?.Text == category.Text)
|
||||
{
|
||||
verbsInCategory.Add(verb);
|
||||
drawIcons = drawIcons || verb.Icon != null;
|
||||
drawIcons = drawIcons || verb.Icon != null || verb.IconEntity != null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user