Separator/BelowSeparatorImportantEnableSaintsEditorbefore using
Draw text, separator, spaces for field/property/button/layout/class/struct on above / below with rich text & dynamic text support.
Parameters:
-
string title=nulldisplay a title.nullfor no title, only separator.If it starts with
$, the leading$will be removed andisCallbackwill be set totrue. Use\$to escape the starting$. -
EColor color=EColor.Graycolor for the title and the separator -
EAlign eAlign=EAlign.Starthow the title is positioned, options are:EAlign.StartEAlign.CenterEAlign.End
-
bool isCallback=falsewhentrue, usetitleas a callback to get a dynamic title -
int space=0leave some space above or below the separator, like whatSpacedoes. -
bool below=falsewhentrue, draw the separator below the field.
[Separator("Separator", EAlign.Center)] public string separator; [Separator("Left", EAlign.Start)] public string left; [Separator("quot; + nameof(right), EAlign.End)] public string right; [Separator(20)] [Separator("Space 20")] public string[] arr; [Separator("End", below: true)] public string end;

Using it with Layout, you can create some fancy appearance:
[LayoutStart("Equipment", ELayout.TitleBox)] [LayoutStart("./Head")] [Separator("Head", EAlign.Center)] public string st; [LayoutCloseHere] public MyStruct inOneStruct; [LayoutStart("./Upper Body")] [InfoBox("Note:left hand can be empty, but not right hand", EMessageType.Warning)] [LayoutStart("./Horizontal", ELayout.Horizontal)] [LayoutStart("./Left Hand")] [Separator("Left Hand", EAlign.Center)] public string g11; public string g12; public MyStruct myStruct; public string g13; [LayoutStart("../Right Hand")] [Separator("Right Hand", EAlign.Center)] public string g21; [LabelText("<color=lime><label/>")] public string g22; [LabelText("quot; + nameof(g23))] public string g23; public bool toggle;

Use it on a class to get a class default seperator. This is useful for inherent.
// AbsSepMono.cs [BelowSeparator("Inherent Fields of <color=brown><container.Type/>", EColor.Brown, EAlign.Center)] [BelowSeparator(10)] public abstract class AbsSepMono : SaintsMonoBehaviour { public string absField1; public string absField2; } // ChildSepMono.cs [Separator("Begin of <container.Type/>", EAlign.Center)] public class ChildSepMono : AbsSepMono { public string childField; }
