IntCfgIdDrawer<TId, TValue>
Namespace: Shadop.Archmage.Sdk.Editor
Generic base for config ID property drawers. TId is the config ID struct type;
TValue is the unmanaged numeric type of its underlying raw value.
Manages the static ID-value and display-name arrays; subclasses populate them by calling Initialize.
public abstract class IntCfgIdDrawer<TId, TValue> : CfgIdDrawer<TValue>Type Parameters
Section titled “Type Parameters”TId
The config ID struct type (e.g. HeroCfgId).
TValue
The underlying unmanaged value type (e.g. long).
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”IntCfgIdDrawer()
Section titled “IntCfgIdDrawer()”protected IntCfgIdDrawer()Methods
Section titled “Methods”GetHeader()
Section titled “GetHeader()”protected string GetHeader()Returns
Section titled “Returns”GetIdValues()
Section titled “GetIdValues()”protected TValue[] GetIdValues()Returns
Section titled “Returns”TValue[]
GetDisplayNames()
Section titled “GetDisplayNames()”protected String[] GetDisplayNames()Returns
Section titled “Returns”Initialize(String, ICollection, Func<TId, TValue>, Func<TValue, String>)
Section titled “Initialize(String, ICollection, Func<TId, TValue>, Func<TValue, String>)”Populates the static ID-value and display-name arrays from a table’s ID collection.
Index 0 is reserved for a 0 (Default) entry; remaining entries are sorted ascending.
protected static void Initialize(string header, ICollection<TId> ids, Func<TId, TValue> id2Value, Func<TValue, string> format)Parameters
Section titled “Parameters”header String
The header text displayed at the top of the dropdown window.
ids ICollection
The ID collection of the config table.
id2Value Func<TId, TValue>
Extracts the raw value from a config ID (e.g. id => id.Value).
format Func<TValue, String>
Formats a raw value into its display string.