Text Formatting

From ESOUI Wiki

Jump to: navigation, search

Text in the game interface accepts some special syntax to allow for some formatting options.

You can test the syntaxes below using the chat window with the following command:

/script d("text")

Where text is any one of the examples below.

To display a regular | character in chat, you can escape it with a second one to get the formatter to ignore it. e.g. "This is my ||" will print "This is my |" in chat.

Contents

Coloring

This option allows you to change the color of the text.

The syntax is:

  1. |c (pipe and a lowercase "c")
  2. followed by a color in hexadecimal RGB notation (6 digit)
  3. followed by the text
  4. followed by |r (pipe and a lowercase "r")

For instance, this:

What color is an |cFF0000apple|r? And the |c0000FFsky|r?

Would look like this:

What color is an apple? And the sky?

Padding

This option allows you to pad your text with blank spaces, before and/or after it.

The syntax is:

  1. |u (pipe and a lowercase "u")
  2. followed by 4 parameters separated by ":"
    1. left padding as either absolute value (only numbers) or percentage of the font height (number and "%")
    2. right padding as either absolute value (only numbers) or percentage of the font height (number and "%")
    3. unknown, you may leave it blank
    4. the actual text
  3. followed by |u (pipe and a lowercase "u") again

Example:

I'm here and you |u50:0::are here|u.
I'm here and you         are here.

Texture

This option allows you render a texture with the text. Specially useful for icons and symbols, like the gold coin besides the money you're carrying displayed at the inventory screen.

The syntax is:

  1. |t (pipe and a lowercase "t")
  2. followed by the 3 or 4 parameters separated by ":"
    1. width of the texture as either absolute value (only numbers) or percentage of the font height (number and "%")
    2. height of the texture as either absolute value (only numbers) or percentage of the font height (number and "%")
    3. path to the texture (.dds file)
    4. optionally the keyword inheritcolor which makes the texture inherit the text color
  3. followed by |t (pipe and a lowercase "t") again

As an example, this:

Look at my |t32:32:esoui/art/icons/mounticon_horse_a.dds|t

Would look like this:

Look at my (picture of a horse)

Label Line

This option allows lines to be placed on text. It is useful for underlines and strike through. Surround the text with you want to have the line on and it will word wrap the line properly with the text. 
The syntax is:
  1. |L (pipe and "L")
  2. followed by the 6 parameters separated by ":"
    1. style of line, available values represented by LABEL_LINE_STYLE_* constants
    2. anchor, LABEL_LINE_ANCHOR_* constants
    3. line order (over or under the text), LABEL_LINE_ORDER_*
    4. number representing Y-offset of line relative to anchor (can be negative)
    5. number representing line thickness
    6. line color hex
  3. followed by |L (pipe and a "L") again
  4. text
  5. followed by |L (pipe and a "L") again to end expression

This:

Put emphasis on |l0:1:1:0:1:000000|lblood|l and |l0:1:0:-25%:2:000000|ldaggers|l.

Would look like this:

Put emphasis on blood and daggers.

Source: [1]

Handler

See How to create custom links.

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox