Examine warnings cleanup (#36162)
* Examine warnings cleanup * Revert unnecessary change * SpriteSystem naming conventions
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
using Content.Client.ContextMenu.UI;
|
||||
using Content.Client.Stylesheets;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -27,14 +23,16 @@ public sealed class ExamineButton : ContainerButton
|
||||
public TextureRect Icon;
|
||||
|
||||
public ExamineVerb Verb;
|
||||
private SpriteSystem _sprite;
|
||||
|
||||
public ExamineButton(ExamineVerb verb)
|
||||
public ExamineButton(ExamineVerb verb, SpriteSystem spriteSystem)
|
||||
{
|
||||
Margin = new Thickness(Thickness, Thickness, Thickness, Thickness);
|
||||
|
||||
SetOnlyStyleClass(StyleClassExamineButton);
|
||||
|
||||
Verb = verb;
|
||||
_sprite = spriteSystem;
|
||||
|
||||
if (verb.Disabled)
|
||||
{
|
||||
@@ -61,7 +59,7 @@ public sealed class ExamineButton : ContainerButton
|
||||
|
||||
if (verb.Icon != null)
|
||||
{
|
||||
Icon.Texture = verb.Icon.Frame0();
|
||||
Icon.Texture = _sprite.Frame0(verb.Icon);
|
||||
Icon.Stretch = TextureRect.StretchMode.KeepAspectCentered;
|
||||
|
||||
AddChild(Icon);
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace Content.Client.Examine
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly VerbSystem _verbSystem = default!;
|
||||
[Dependency] private readonly SpriteSystem _sprite = default!;
|
||||
|
||||
public const string StyleClassEntityTooltip = "entity-tooltip";
|
||||
|
||||
@@ -332,7 +333,7 @@ namespace Content.Client.Examine
|
||||
if (!examine.ShowOnExamineTooltip)
|
||||
continue;
|
||||
|
||||
var button = new ExamineButton(examine);
|
||||
var button = new ExamineButton(examine, _sprite);
|
||||
|
||||
if (examine.HoverVerb)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user