UI ข้อความที่รวย ใช้แท็กเครื่องหมายง่ายๆ เพื่อสร้างส่วนของสตริงในแบบพิมพ์เขียว, อิตาลิค, ภายใต้เส้น, เติมสี, การเปลี่ยนแปลงขอบเส้น, และอื่นๆคุณสามารถใช้แท็กสไตล์กับ TextLabel , TextButton และ TextBox วัตถุได้
เปิดใช้งานข้อความที่มีรูปแบบรวย
คุณต้องเปิดใช้งานข้อความที่มีรูปแบบรวยบนพื้นฐานของแต่ละวัตถุผ่านคุณสมบัติ RichText ในหน้าต่าง คุณสมบัติ หรือโดยการตั้งค่าคุณสมบัติให้เป็น true ใน LocalScript

local title = Instance.new("TextLabel")title.RichText = truetitle.Text = "Use a <b>bold title</b>"
แท็กที่สนับสนุน
แท็กข้อความที่รวยมีลักษณะคล้ายกับแท็ก XML/HTML และคุณต้องรวมทั้งแท็กเปิดและปิดรอบข้อความที่รูปแบบไว้
<b>Formatted text</b>
คุณยังสามารถซ้อนแท็กภายในกันได้ตราบเท่าที่คุณปิดพวกมันในลำดับย้อนกลับของวิธีที่คุณเปิดพวกมัน
<b><i><u>Formatted text</u></i></b>
สีของฟอนต์
<font color=""> </font>
I want the <font color="#FF7800">orange</font> candy.``I want the <font color="rgb(255,125,0)">orange</font> candy.

ขนาดฟอนต์
<font size=""> </font>
<font size="40">This is big.</font> <font size="20">This is small.</font>

หน้าฟอนต์
<font face=""> </font>
<font face="Michroma">This is Michroma face.</font>

ครอบครัวฟอนต์
<font family=""> </font>
<font family="rbxasset://fonts/families/Michroma.json">This is Michroma face.</font>

น้ำหนักของฟอนต์
<font weight=""> </font>
This is normal. <font weight="heavy">This is heavy.</font>``This is normal. <font weight="900">This is heavy.</font>

ความโปร่งใสของฟอนต์
<font transparency=""> </font>
Text at <font transparency="0.5">50% transparency</font>.

ขอบเขต
<stroke> </stroke>
You won <stroke color="#00A2FF" joins="miter" thickness="2" transparency="0.25">25 gems</stroke>.

ห้าวหาญ
<b> </b>
Text in <b>bold</b>.

อิตาลิก
<i> </i>
Text <i>italicized</i>.

เส้นใต้
<u> </u>
Text <u>underlined</u>.

ผ่านการโจมตี
<s> </s>
Text with <s>strikethrough</s> applied.

ทำลายบรรทัด
<br/>
New line occurs after this sentence.<br/>Next sentence...

ตัวเขียนใหญ่
<uppercase> </uppercase>``<uc> </uc>
<uppercase>Uppercase</uppercase> makes words read loudly!``<uc>Uppercase</uc> makes words read loudly!

หมวกขนาดเล็ก
<smallcaps> </smallcaps>``<sc> </sc>
My name is <smallcaps>Diva Dragonslayer</smallcaps>.``My name is <sc>Diva Dragonslayer</sc>.

ทำเครื่องหมาย
<mark> </mark>
Text <mark color="#009966" transparency="0">highlighted</mark>.

แสดงความเห็น
<!-- -->
After this is a comment...<!--This does not appear in the final text--> and now more text...

หลบหนีแบบฟอร์ม
หากคุณต้องการเรนเดอร์ตัวละครบางตัวเช่น < หรือ > และยกเว้นพวกเขาจากการพิจารณาเป็นส่วนหนึ่งของแท็กข้อความที่มีรูปแบบรวย คุณสามารถเขียนพวกเขาในรูปแบบการหลบหนีของพวกเขา ****
ตัวละคร | หนี | ตัวอย่าง | ผลลัพธ์ |
---|---|---|---|
< | < | 10 < 100 | 10 < 100 |
> | > | 100 > 10 | 100 > 10 |
" | " | Meet "Diva Dragonslayer" | พบกับ "Diva Dragonslayer" |
' | ' | Diva's pet is a falcon! | สัตว์เลี้ยงของ Diva คือเหยี่ยว! |
& | & | Render another escape form <b>&lt;</b> by escaping an ampersand | เรนเดอร์อีกแบบฟอร์มหลบหนี < โดยหลบอัปเปอร์แคนด์ |