Class ChatLine
A single line in the chat, composed of colored segments.
public class ChatLine
- Inheritance
-
ChatLine
- Inherited Members
Constructors
ChatLine(List<ChatSegment>)
public ChatLine(List<ChatSegment> segments)
Parameters
segmentsList<ChatSegment>
ChatLine(string)
public ChatLine(string plainText)
Parameters
plainTextstring
Properties
Segments
public List<ChatSegment> Segments { get; }
Property Value
TextLength
public int TextLength { get; }
Property Value
Methods
FromAnsi(string, Attribute?)
Parse a string containing ANSI 24-bit color escape codes into colored segments. Format: \x1b[38;2;R;G;Bm (foreground color), \x1b[0m (reset)
public static ChatLine FromAnsi(string ansiText, Attribute? defaultAttr = null)
Parameters
ansiTextstringdefaultAttrAttribute?
Returns
ToString()
public override string ToString()
Returns
Wrap(int, int)
Wrap this line into multiple lines that fit within the given width. Continuation lines are indented with the specified number of spaces.
public List<ChatLine> Wrap(int width, int continuationIndent = 0)