Modular Database Tools
Extracted all inspector code for database inspector into a single class per supported field type and wrote reflection code to invoke them automatically Removed all Aetheria-specific code from database tools Database View editor is now abstract and supports arbitrary grouping of entry types; specific users must implement their own database view
This commit is contained in:
parent
48759380c5
commit
526a737a4d
72 changed files with 1674 additions and 1624 deletions
31
Assets/Scripts/CultCache/Editor/BaseInspector.cs
Normal file
31
Assets/Scripts/CultCache/Editor/BaseInspector.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
|
||||
public abstract class BaseInspector<T>
|
||||
{
|
||||
protected const int width = 150;
|
||||
protected const int labelWidth = 20;
|
||||
protected const int toggleWidth = 18;
|
||||
protected const int arrowWidth = 22;
|
||||
|
||||
public abstract T Inspect(string label, T value, object parent, DatabaseInspector inspectorWindow);
|
||||
}
|
||||
|
||||
public abstract class BaseInspector<T, A> where A : Attribute
|
||||
{
|
||||
protected const int width = 150;
|
||||
protected const int labelWidth = 20;
|
||||
protected const int toggleWidth = 18;
|
||||
protected const int arrowWidth = 22;
|
||||
|
||||
public abstract T Inspect(string label, T value, object parent, DatabaseInspector inspectorWindow, A attribute);
|
||||
}
|
||||
|
||||
public abstract class BaseInspector<T, A, B> where A : Attribute where B : Attribute
|
||||
{
|
||||
protected const int width = 150;
|
||||
protected const int labelWidth = 20;
|
||||
protected const int toggleWidth = 18;
|
||||
protected const int arrowWidth = 22;
|
||||
|
||||
public abstract T Inspect(string label, T value, object parent, DatabaseInspector inspectorWindow, A attributeA, B attributeB);
|
||||
}
|
||||
Loading…
Reference in a new issue