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