mirror of
https://github.com/AnnulusGames/Alchemy.git
synced 2025-01-22 08:18:51 -05:00
Change: CreateListViewFromSettingsAttribute -> CreateListViewFromFieldInfo
This commit is contained in:
parent
0d1063b13a
commit
18ccff10cb
@ -18,7 +18,7 @@ namespace Alchemy.Editor.Elements
|
||||
|
||||
var settings = property.GetAttribute<ListViewSettingsAttribute>(true);
|
||||
|
||||
var listView = GUIHelper.CreateListViewFromSettingsAttribute(settings);
|
||||
var listView = GUIHelper.CreateListViewFromFieldInfo(property.GetFieldInfo());
|
||||
listView.headerTitle = ObjectNames.NicifyVariableName(property.displayName);
|
||||
listView.bindItem = (element, index) =>
|
||||
{
|
||||
|
@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEngine.Assertions;
|
||||
using Alchemy.Inspector;
|
||||
using System;
|
||||
|
||||
namespace Alchemy.Editor
|
||||
{
|
||||
@ -51,8 +52,9 @@ namespace Alchemy.Editor
|
||||
};
|
||||
}
|
||||
|
||||
public static ListView CreateListViewFromSettingsAttribute(ListViewSettingsAttribute settings)
|
||||
public static ListView CreateListViewFromFieldInfo(FieldInfo fieldInfo)
|
||||
{
|
||||
var settings = fieldInfo.GetCustomAttribute<ListViewSettingsAttribute>();
|
||||
return new ListView
|
||||
{
|
||||
reorderable = settings == null ? true : settings.Reorderable,
|
||||
|
Loading…
Reference in New Issue
Block a user