CfgIdDrawer<TValue>
Namespace: Shadop.Archmage.Sdk.Editor
Abstract base for config ID property drawers. Renders an ArchmageTools.DrawEasyDropdown
public abstract class CfgIdDrawer<TValue> : UnityEditor.PropertyDrawerType Parameters
Section titled “Type Parameters”TValue
The underlying numeric or string type of the config ID.
Inheritance Object → GUIDrawer → PropertyDrawer → CfgIdDrawer
Properties
Section titled “Properties”attribute
Section titled “attribute”public PropertyAttribute attribute { get; }Property Value
Section titled “Property Value”PropertyAttribute
fieldInfo
Section titled “fieldInfo”public FieldInfo fieldInfo { get; }Property Value
Section titled “Property Value”preferredLabel
Section titled “preferredLabel”public string preferredLabel { get; }Property Value
Section titled “Property Value”Constructors
Section titled “Constructors”CfgIdDrawer()
Section titled “CfgIdDrawer()”protected CfgIdDrawer()Methods
Section titled “Methods”GetHeader()
Section titled “GetHeader()”Returns the header text displayed at the top of the dropdown window.
protected abstract string GetHeader()Returns
Section titled “Returns”GetIdValues()
Section titled “GetIdValues()”Returns the config ID values shown in the dropdown.
protected abstract TValue[] GetIdValues()Returns
Section titled “Returns”TValue[]
GetDisplayNames()
Section titled “GetDisplayNames()”Returns the display strings, one for each ID value.
protected abstract String[] GetDisplayNames()Returns
Section titled “Returns”BuildDisplayNames(TValue[], Func<TValue, String>, Int32)
Section titled “BuildDisplayNames(TValue[], Func<TValue, String>, Int32)”Builds a display-name array from values.
protected static String[] BuildDisplayNames(TValue[] values, Func<TValue, string> format, int start)Parameters
Section titled “Parameters”values TValue[]
The ID values array.
format Func<TValue, String>
Formatter that converts an ID value to its display string.
start Int32
Index to start formatting from. Entries before start
are left as null so the caller can fill them manually (e.g., a “Default” label at index 0).
Returns
Section titled “Returns”OnGUI(Rect, SerializedProperty, GUIContent)
Section titled “OnGUI(Rect, SerializedProperty, GUIContent)”public void OnGUI(Rect position, SerializedProperty property, GUIContent label)Parameters
Section titled “Parameters”position Rect
property SerializedProperty
label GUIContent