41 lines
981 B
C#
41 lines
981 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using BITKit;
|
|
using BITKit.GameEditor;
|
|
using BITKit.UX;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
using UnityEngine.UIElements;
|
|
|
|
namespace BITFALL.GameEditor
|
|
{
|
|
public class ItemEditor : ScriptableObjectGroupEditor<AssetableItem>
|
|
{
|
|
protected override string AssetsPath => "Assets/Artists/Configs/Items/";
|
|
|
|
[MenuItem("Tools/ScriptableObjectEditor/ItemEditor")]
|
|
public static void Open()
|
|
{
|
|
var window = GetWindow<ItemEditor>();
|
|
window.titleContent = new GUIContent("Item Editor");
|
|
|
|
window.Show();
|
|
}
|
|
protected override void BindItem(VisualElement arg1, int arg2)
|
|
{
|
|
var item = List[arg2];
|
|
var container = new UXContainer(arg1);
|
|
|
|
arg1.userData = item;
|
|
|
|
container.contextLabel.text = item.Name;
|
|
container.icon.style.backgroundImage = item.SquareIcon;
|
|
|
|
var color = AssetableItem.GetQualityColor(item.Quality);
|
|
color.a = 0.2f;
|
|
arg1.style.backgroundColor = color;
|
|
}
|
|
}
|
|
|
|
}
|