View Source FLHook.XMLText (FLHook Client v1.0.0)

The XML text module allows composing formatted text to be sent via a chat command.

Link to this section Summary

Functions

Adds a format node the specified XML text struct. You can specify a color and optional format flags.

Creates a new XML text struct with the specified content.

Adds a text node to the specified XML text struct.

Converts the XML text struct to a string.

Link to this section Types

Specs

color() ::
  {red :: non_neg_integer(), green :: non_neg_integer(),
   blue :: non_neg_integer()}
  | String.t()

Specs

flag() ::
  :bold
  | :italic
  | :underline
  | :big
  | :big_wide
  | :very_big
  | :smoothest
  | :smoother
  | :small

Specs

t() :: %FLHook.XMLText{chardata: IO.chardata()}

Link to this section Functions

Link to this function

format(xml_text, color, flags \\ [])

View Source

Specs

format(t(), color(), flag() | [flag()]) :: t()

Adds a format node the specified XML text struct. You can specify a color and optional format flags.

Specs

new([
  {:format, color()}
  | {:format, color(), flag() | [flag()]}
  | {:text, String.Chars.t()}
  | String.Chars.t()
]) :: t()

Creates a new XML text struct with the specified content.

Specs

text(t(), String.Chars.t()) :: t()

Adds a text node to the specified XML text struct.

Specs

to_string(t()) :: String.t()

Converts the XML text struct to a string.