Skip to content

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>

Inheritance ObjectPropertyDrawerCfgIdDrawer<String>StrCfgIdDrawer<TId>

Initialize(String, ICollection<TId>, Func<TId, String>, Func<String, String>)

Section titled “Initialize(String, ICollection<TId>, 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)

header String
The header text displayed at the top of the dropdown window.

ids ICollection<TId>
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.