Rename resource meta interface.
This commit is contained in:
@@ -3,8 +3,8 @@ using UnityEngine;
|
||||
namespace Cryville.Crtr.Browsing.UI {
|
||||
internal abstract class BrowserItem : MonoBehaviour {
|
||||
public int? Id { get; private set; }
|
||||
protected IBrowserItemMeta meta;
|
||||
internal void Load(int id, IBrowserItemMeta item, bool selected) {
|
||||
protected IResourceMeta meta;
|
||||
internal void Load(int id, IResourceMeta item, bool selected) {
|
||||
OnReset();
|
||||
Id = id;
|
||||
meta = item;
|
||||
|
@@ -1,7 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cryville.Crtr.Browsing.UI {
|
||||
public interface IBrowserItemMeta {
|
||||
IEnumerable<MetaProperty> Properties { get; }
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 026e696a02e3d674bad92bf80aa77278
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cryville.Crtr.Browsing.UI {
|
||||
public class MetaProperty {
|
||||
public string Name { get; set; }
|
||||
public IReadOnlyDictionary<string, object> Values { get; set; }
|
||||
public object MainValue { get { return Values[""]; } }
|
||||
public MetaProperty(string name, IReadOnlyDictionary<string, object> values) {
|
||||
if (values.Count == 0) throw new ArgumentException("Value is empty.");
|
||||
if (!values.ContainsKey("")) throw new ArgumentException("Main value is missing.");
|
||||
Name = name;
|
||||
Values = values;
|
||||
}
|
||||
public MetaProperty(string name, object value) {
|
||||
Name = name;
|
||||
Values = new Dictionary<string, object> { { "", value } };
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8ccfc6a81a7c774d8df59df0ddd4c1a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user