Lore archive · Warcraft Wiki, 2023 dump
UI escape sequences
Last wiki revision 2023-09-20
Many UI elements that display text on the screen support special escape sequences starting with the | pipe character.
|cAA<font color=FF0000>RR <font color=00FF00>GG <font color=0000FF>BB text|r > this is red and this is green back to red back to white
- Each pair of digits represents a color value (plus the alpha value, however the alpha value is currently ignored and should always be FF) as a hexadecimal number. The escape sequence pops nested color sequences in-order.
|cn<font color="#ecbc2a">colorname :<font color="#80ff80">text |r > Normal Text Green Text Red Text Green Text Normal Text
- Renders a text string with a named global color.
|T<font color="#ecbc2a">path :<font color="#80ff80">height [:<font color="#8080ff">width [:<font color="#ff8080">offsetX :<font color="#ff8080">offsetY [:<font color="#C79C6E">textureWidth :<font color="#C79C6E">textureHeight :leftTexel:rightTexel:topTexel:bottomTexel[:<font color="#FF0000">rVertexColor :<font color="#00F00">gVertexColor :<font color="#0000FF">bVertexColor ]]]]|t
- Will insert a texture into a font string. Parameter is optional (see below). The offsets are optional and will shift the texture from where it would normally be placed. is based on size of the font used - this is used to automatically scale icons based on the size of the text.
- (always square!)
- (always square!)
- (always square!)
- (height is height!!!)
- (width is an aspect ratio and defines width!!!)
- Offset for the rendered image, in pixels
- Size of the source image, in pixels
- Coordinates that identify the left/right/top/bottom edges, in pixels (see but non-normalized)
- RGB color values in the range 0-255 that are used to tint the texture
- Notes:
- When you need to display a square icon in the string (spell/item icon), use only
- When you need to display a rectangular image in the string (Blizzard logo), use aspect ratio version:
Atlases allow for easily getting part of a texture without having to use tex coords. |A:<font color="#ecbc2a">atlas :<font color="#80ff80">height :<font color="#8080ff">width [:<font color="#ff8080">offsetX :<font color="#ff8080">offsetY [: rVertexColor : gVertexColor : bVertexColor ]]|a
- Both slash or escaped backslashes are valid file separators.
- Parameters that are zeros can be omitted in between characters.
- Utility functions:
- WrapTextInColorCode
- CreateTextureMarkup
- CreateAtlasMarkup
Also known as Kstrings - they prevent strings from being parsed. For example addons/scripts only see the string instead of the actual displayed name.
- for the confidentiality of Battle.net account names in.
- for the name and comment in group finder listings in and.
- prevents using the message history as a persistent data storage in and.
- for the message in.
is for Korean postpositions. For example object particles - Eul 을 is used following a consonant, Reul 를 is used following a vowel. print("라면|1을;를;") -- 라면<font color="#ecbc2a">을 ramyeon<font color="#ecbc2a">eul print("나무|1을;를;") -- 나무<font color="#ecbc2a">를 namu<font color="#ecbc2a">reul
is for French prepositions - de before a consonant and d' before a vowel. Having zero, one or multiple trailing spaces after |2 does not matter for the end result.
is for the Russian declension of nouns (including proper names) which take different forms based on their usage in a sentence. See also.
or for ruRU. This assigns the singular or plural form depending on the number.
behaves the same as |4 but appears to only work while on certain non-english locales.
is for indefinite articles, a is used before words starting with a consonant sound, an is used before words starting with a vowel sound.
appears to convert only the next word to lowercase.
|W<font color="#ecbc2a">text |w Hints that word wrapping of <font color="#ecbc2a">text should be avoided where possible. If the text would require wrapping the client will prefer to wrap before the start of the sequence instead of breaking it up. If the text is still too large, the hint may be ignored and the text broken up regardless.
- : Newline, if the widget supports it. Similar behavior as and
- : Escapes the "|" character.
- Any invalid escape sequences will be displayed as-is or is otherwise undefined behavior.
- Hyperlinks
Source
https://warcraft.wiki.gg/wiki/UI_escape_sequences · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.