FieldInfoBox/FieldBelowInfoBoxDraw an info box above/below the field.
Unlike InfoBox, use this on an array/list, the box will be applied to every element (instead of the array/list itself).
-
string contentThe content of the info box.
If it starts with
$, the leading$will be removed andisCallbackwill be set totrue. Use\$to escape the starting$. -
EMessageType messageType=EMessageType.InfoMessage icon. Options are
NoneInfoWarningError
-
string show=nulla callback name or property name for show or hide this info box.
-
bool isCallback=falseif true, the
contentwill be interpreted as a property/callback function.If the value (or returned value) is a string, then the content will be changed
If the value is
(EMessageType messageType, string content)then both content and message type will be changed -
bool below=falseDraw the info box below the field instead of above
-
string groupBy=""SeeGroupBysection -
AllowMultiple: Yes
BelowInfoBox is a shortcut for [InfoBox(..., below: true)]
using SaintsField; [field: SerializeField] private bool _show; [Space] [FieldInfoBox("Hi\nwrap long line content content content content content content content content content content content content content content content content content content content content content content content content content", EMessageType.None)] [FieldBelowInfoBox("quot; + nameof(DynamicMessage), EMessageType.Warning)] [FieldBelowInfoBox("quot; + nameof(DynamicMessageWithIcon))] [FieldBelowInfoBox("Hi\n toggle content ", EMessageType.Info, nameof(_show))] public bool _content; private (EMessageType, string) DynamicMessageWithIcon => _content ? (EMessageType.Error, "False!") : (EMessageType.None, "True!"); private string DynamicMessage() => _content ? "False" : "True";