23 lines
525 B
C#
23 lines
525 B
C#
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;
|
|
}
|
|
}
|
|
|
|
}
|