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);
|
||||
|
||||
Reference in New Issue
Block a user