Added TextureButton for opening Storage items
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.Utility;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
@@ -52,7 +52,8 @@ namespace Content.Client.GameObjects
|
||||
void AddButton(out InventoryButton variable, Slots slot, string textureName)
|
||||
{
|
||||
var texture = _resourceCache.GetTexture($"/Textures/UserInterface/Inventory/{textureName}.png");
|
||||
variable = new InventoryButton(slot, texture)
|
||||
var storageTexture = _resourceCache.GetTexture($"/Textures/UserInterface/Inventory/back.png");
|
||||
variable = new InventoryButton(slot, texture, storageTexture)
|
||||
{
|
||||
OnPressed = AddToInventory
|
||||
};
|
||||
@@ -152,7 +153,8 @@ namespace Content.Client.GameObjects
|
||||
void AddButton(Slots slot, string textureName, Vector2 position)
|
||||
{
|
||||
var texture = resourceCache.GetTexture($"/Textures/UserInterface/Inventory/{textureName}.png");
|
||||
var button = new InventoryButton(slot, texture)
|
||||
var storageTexture = resourceCache.GetTexture($"/Textures/UserInterface/Inventory/back.png");
|
||||
var button = new InventoryButton(slot, texture, storageTexture)
|
||||
{
|
||||
Position = position
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user