Hide
FieldLabelText

Like LabelText, but it can be applied to an array/list to change the element label (instead of the label of array/list itself)

  1. Ensure you make it a callback: isCallback=true, or the richTextXml starts with $
  2. It'll pass the element value and index to your function
  3. Return the desired label content from the function

Here is an example of using on an array:

using SaintsField; [FieldLabelText("
quot;
+ nameof(ArrayLabels))] public string[] arrayLabels; // if you do not care about the actual value, use `object` as the first parameter private string ArrayLabels(object _, int index) =>
quot;<color=pink>[
{(char)('A' + index)}]";

label_array