1
This commit is contained in:
22
Assets/Artists/Scripts/UX/UXUtils.cs
Normal file
22
Assets/Artists/Scripts/UX/UXUtils.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.UX;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace BITFALL.UX
|
||||
{
|
||||
public static class UXUtils
|
||||
{
|
||||
public static UXContainer CreateItemContainer(VisualElement visualElement, IBasicItem item)
|
||||
{
|
||||
var asset = item.GetAssetable();
|
||||
var uxContainer = new UXContainer(visualElement);
|
||||
uxContainer.icon.style.backgroundImage = asset.SquareIcon;
|
||||
uxContainer.contextLabel.text = asset.Name;
|
||||
return uxContainer;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user