Table of Contents

Class ChatLine

Namespace
EchoHub.Client.UI
Assembly
EchoHub.Client.dll

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

segments List<ChatSegment>

ChatLine(string)

public ChatLine(string plainText)

Parameters

plainText string

Properties

Segments

public List<ChatSegment> Segments { get; }

Property Value

List<ChatSegment>

TextLength

public int TextLength { get; }

Property Value

int

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

ansiText string
defaultAttr Attribute?

Returns

ChatLine

ToString()

public override string ToString()

Returns

string

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)

Parameters

width int
continuationIndent int

Returns

List<ChatLine>