UI reicher Text verwendet einfache Markierungs-Tags, um Bereiche eines Strings in Bold, Items, Unterstrich, Füllfarbe, Strokes und mehr zu stylen. Sie können Styling-Tags auf TextLabel , TextButton und TextBox -Objekten anwenden.
Aktiviere reichlichen Text
Du musst reichlichen Text auf einer pro-objekt-Basis durch seine RichText-Eigenschaft in der Eigenschaften-Fenster oder durch Setzen der Eigenschaft auf true in einem Class.LocalScript aktivieren.

local title = Instance.new("TextLabel")title.RichText = truetitle.Text = "Use a <b>bold title</b>"
Unterstützte Tags
Reich-Text-Tags sind ähnlich wie XML/HTML-Tags und Sie müssen sowohl einen Öffnung- als auch einen Schließungstag um den formatierten Text enthalten.
<b>Formatted text</b>
Du kannst auch Tags in einander verschachteln, solange du sie im rückwärtigen Ordnung schließt, wie du sie geöffnet hast.
<b><i><u>Formatted text</u></i></b>
Farbe
<font color=""> </font>
I want the <font color="#FF7800">orange</font> candy.``I want the <font color="rgb(255,125,0)">orange</font> candy.

Größe
<font size=""> </font>
<font size="40">This is big.</font> <font size="20">This is small.</font>

Zeichen
<font face=""> </font>
<font face="Michroma">This is Michroma face.</font>

Font-Familie
<font family=""> </font>
<font family="rbxasset://fonts/families/Michroma.json">This is Michroma face.</font>

Zeichengewicht
<font weight=""> </font>
This is normal. <font weight="heavy">This is heavy.</font>``This is normal. <font weight="900">This is heavy.</font>

Strich
<stroke> </stroke>
You won <stroke color="#00A2FF" joins="miter" thickness="2" transparency="0.25">25 gems</stroke>.

Transparenz
<font transparency=""> </font>
Text at <font transparency="0.5">50% transparency</font>.

Mutig
<b> </b>
Text in <b>bold</b>.

Italisch
<i> </i>
Text <i>italicized</i>.

Unterstrich
<u> </u>
Text <u>underlined</u>.

Durchgestrichen
Text mit strikethrough

Zeilennachrast
<br />
New line occurs after this sentence.<br />Next sentence...

Oberkiste
<uppercase> </uppercase>``<uc> </uc>
<uppercase>Uppercase</uppercase> makes words read loudly!``<uc>Uppercase</uc> makes words read loudly!

Kleine Kapseln
<smallcaps> </smallcaps>``<sc> </sc>
My name is <smallcaps>Diva Dragonslayer</smallcaps>.``My name is <sc>Diva Dragonslayer</sc>.

Markieren
<mark> </mark>
Text <mark color="#009966" transparency="0">highlighted</mark>.

Kommentar
<!-- -->
After this is a comment...<!--This does not appear in the final text--> and now more text...

Entkomme aus Formen
Wenn Sie bestimmte Zeichen wie < oder > rendern und sie von der Betrachtung als Teil von Rich-Text-Tags befrehen möchten, können Sie sie in leur escape-Form schreiben.
Personagem | 逃脱 | Exemplo | Resultado |
---|---|---|---|
<) | < | 10 < 100 | 10 < 100 |
> | ><1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1<1< | 100 > 10 | 100 > 10 |
"título de exemplo" | " | Meet "Diva Dragonslayer" | Conheça "Diva Dragonslayer" |
“ | ' | Diva's pet is a falcon! | Animal de estimação da Diva é um falcão! |
和 | & | Render another escape form <b>&lt;</b> by escaping an ampersand | Render outro formulário de fuga < ao escapar de um ampersand |