RichTextLabel.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="RichTextLabel" inherits="Control" version="4.0">
  3. <brief_description>
  4. Label that displays rich text.
  5. </brief_description>
  6. <description>
  7. Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights.
  8. [b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods.
  9. [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].
  10. [b]Note:[/b] [code]push_*/pop[/code] functions won't affect BBCode.
  11. [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property.
  12. </description>
  13. <tutorials>
  14. <link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/ui/bbcode_in_richtextlabel.html</link>
  15. <link title="GUI Rich Text/BBcode Demo">https://godotengine.org/asset-library/asset/132</link>
  16. <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
  17. </tutorials>
  18. <methods>
  19. <method name="add_image">
  20. <return type="void" />
  21. <argument index="0" name="image" type="Texture2D" />
  22. <argument index="1" name="width" type="int" default="0" />
  23. <argument index="2" name="height" type="int" default="0" />
  24. <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
  25. <argument index="4" name="inline_align" type="int" enum="InlineAlign" default="5" />
  26. <description>
  27. Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
  28. If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
  29. </description>
  30. </method>
  31. <method name="add_text">
  32. <return type="void" />
  33. <argument index="0" name="text" type="String" />
  34. <description>
  35. Adds raw non-BBCode-parsed text to the tag stack.
  36. </description>
  37. </method>
  38. <method name="append_text">
  39. <return type="void" />
  40. <argument index="0" name="bbcode" type="String" />
  41. <description>
  42. Parses [code]bbcode[/code] and adds tags to the tag stack as needed.
  43. [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text].
  44. </description>
  45. </method>
  46. <method name="clear">
  47. <return type="void" />
  48. <description>
  49. Clears the tag stack and sets [member text] to an empty string.
  50. </description>
  51. </method>
  52. <method name="get_content_height" qualifiers="const">
  53. <return type="int" />
  54. <description>
  55. Returns the height of the content.
  56. </description>
  57. </method>
  58. <method name="get_line_count" qualifiers="const">
  59. <return type="int" />
  60. <description>
  61. Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
  62. </description>
  63. </method>
  64. <method name="get_paragraph_count" qualifiers="const">
  65. <return type="int" />
  66. <description>
  67. Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
  68. </description>
  69. </method>
  70. <method name="get_parsed_text" qualifiers="const">
  71. <return type="String" />
  72. <description>
  73. Returns the text without BBCode mark-up.
  74. </description>
  75. </method>
  76. <method name="get_selected_text" qualifiers="const">
  77. <return type="String" />
  78. <description>
  79. Returns the current selection text. Does not include BBCodes.
  80. </description>
  81. </method>
  82. <method name="get_selection_from" qualifiers="const">
  83. <return type="int" />
  84. <description>
  85. Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
  86. </description>
  87. </method>
  88. <method name="get_selection_to" qualifiers="const">
  89. <return type="int" />
  90. <description>
  91. Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
  92. </description>
  93. </method>
  94. <method name="get_total_character_count" qualifiers="const">
  95. <return type="int" />
  96. <description>
  97. Returns the total number of characters from text tags. Does not include BBCodes.
  98. </description>
  99. </method>
  100. <method name="get_v_scroll">
  101. <return type="VScrollBar" />
  102. <description>
  103. Returns the vertical scrollbar.
  104. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
  105. </description>
  106. </method>
  107. <method name="get_visible_line_count" qualifiers="const">
  108. <return type="int" />
  109. <description>
  110. Returns the number of visible lines.
  111. </description>
  112. </method>
  113. <method name="get_visible_paragraph_count" qualifiers="const">
  114. <return type="int" />
  115. <description>
  116. Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
  117. </description>
  118. </method>
  119. <method name="install_effect">
  120. <return type="void" />
  121. <argument index="0" name="effect" type="Variant" />
  122. <description>
  123. Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect].
  124. </description>
  125. </method>
  126. <method name="newline">
  127. <return type="void" />
  128. <description>
  129. Adds a newline tag to the tag stack.
  130. </description>
  131. </method>
  132. <method name="parse_bbcode">
  133. <return type="void" />
  134. <argument index="0" name="bbcode" type="String" />
  135. <description>
  136. The assignment version of [method append_text]. Clears the tag stack and inserts the new content.
  137. </description>
  138. </method>
  139. <method name="parse_expressions_for_values">
  140. <return type="Dictionary" />
  141. <argument index="0" name="expressions" type="PackedStringArray" />
  142. <description>
  143. Parses BBCode parameter [code]expressions[/code] into a dictionary.
  144. </description>
  145. </method>
  146. <method name="pop">
  147. <return type="void" />
  148. <description>
  149. Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods.
  150. </description>
  151. </method>
  152. <method name="push_bgcolor">
  153. <return type="void" />
  154. <argument index="0" name="bgcolor" type="Color" />
  155. <description>
  156. Adds a [code][bgcolor][/code] tag to the tag stack.
  157. </description>
  158. </method>
  159. <method name="push_bold">
  160. <return type="void" />
  161. <description>
  162. Adds a [code][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code][b][/code] tag if not currently in a [code][i][/code] tag.
  163. </description>
  164. </method>
  165. <method name="push_bold_italics">
  166. <return type="void" />
  167. <description>
  168. Adds a [code][font][/code] tag with a bold italics font to the tag stack.
  169. </description>
  170. </method>
  171. <method name="push_cell">
  172. <return type="void" />
  173. <description>
  174. Adds a [code][cell][/code] tag to the tag stack. Must be inside a [code][table][/code] tag. See [method push_table] for details.
  175. </description>
  176. </method>
  177. <method name="push_color">
  178. <return type="void" />
  179. <argument index="0" name="color" type="Color" />
  180. <description>
  181. Adds a [code][color][/code] tag to the tag stack.
  182. </description>
  183. </method>
  184. <method name="push_dropcap">
  185. <return type="void" />
  186. <argument index="0" name="string" type="String" />
  187. <argument index="1" name="font" type="Font" />
  188. <argument index="2" name="size" type="int" />
  189. <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
  190. <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
  191. <argument index="5" name="outline_size" type="int" default="0" />
  192. <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
  193. <description>
  194. Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
  195. </description>
  196. </method>
  197. <method name="push_fgcolor">
  198. <return type="void" />
  199. <argument index="0" name="fgcolor" type="Color" />
  200. <description>
  201. Adds a [code][fgcolor][/code] tag to the tag stack.
  202. </description>
  203. </method>
  204. <method name="push_font">
  205. <return type="void" />
  206. <argument index="0" name="font" type="Font" />
  207. <description>
  208. Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
  209. </description>
  210. </method>
  211. <method name="push_font_features">
  212. <return type="void" />
  213. <argument index="0" name="opentype_features" type="Dictionary" />
  214. <description>
  215. Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration.
  216. </description>
  217. </method>
  218. <method name="push_font_size">
  219. <return type="void" />
  220. <argument index="0" name="font_size" type="int" />
  221. <description>
  222. Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
  223. </description>
  224. </method>
  225. <method name="push_indent">
  226. <return type="void" />
  227. <argument index="0" name="level" type="int" />
  228. <description>
  229. Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
  230. </description>
  231. </method>
  232. <method name="push_italics">
  233. <return type="void" />
  234. <description>
  235. Adds a [code][font][/code] tag with a italics font to the tag stack. This is the same as adding a [code][i][/code] tag if not currently in a [code][b][/code] tag.
  236. </description>
  237. </method>
  238. <method name="push_list">
  239. <return type="void" />
  240. <argument index="0" name="level" type="int" />
  241. <argument index="1" name="type" type="int" enum="RichTextLabel.ListType" />
  242. <argument index="2" name="capitalize" type="bool" />
  243. <description>
  244. Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
  245. </description>
  246. </method>
  247. <method name="push_meta">
  248. <return type="void" />
  249. <argument index="0" name="data" type="Variant" />
  250. <description>
  251. Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
  252. </description>
  253. </method>
  254. <method name="push_mono">
  255. <return type="void" />
  256. <description>
  257. Adds a [code][font][/code] tag with a monospace font to the tag stack.
  258. </description>
  259. </method>
  260. <method name="push_normal">
  261. <return type="void" />
  262. <description>
  263. Adds a [code][font][/code] tag with a normal font to the tag stack.
  264. </description>
  265. </method>
  266. <method name="push_outline_color">
  267. <return type="void" />
  268. <argument index="0" name="color" type="Color" />
  269. <description>
  270. Adds a [code][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
  271. </description>
  272. </method>
  273. <method name="push_outline_size">
  274. <return type="void" />
  275. <argument index="0" name="outline_size" type="int" />
  276. <description>
  277. Adds a [code][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
  278. </description>
  279. </method>
  280. <method name="push_paragraph">
  281. <return type="void" />
  282. <argument index="0" name="align" type="int" enum="RichTextLabel.Align" />
  283. <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
  284. <argument index="2" name="language" type="String" default="&quot;&quot;" />
  285. <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0" />
  286. <description>
  287. Adds a [code][p][/code] tag to the tag stack.
  288. </description>
  289. </method>
  290. <method name="push_strikethrough">
  291. <return type="void" />
  292. <description>
  293. Adds a [code][s][/code] tag to the tag stack.
  294. </description>
  295. </method>
  296. <method name="push_table">
  297. <return type="void" />
  298. <argument index="0" name="columns" type="int" />
  299. <argument index="1" name="inline_align" type="int" enum="InlineAlign" default="0" />
  300. <description>
  301. Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
  302. </description>
  303. </method>
  304. <method name="push_underline">
  305. <return type="void" />
  306. <description>
  307. Adds a [code][u][/code] tag to the tag stack.
  308. </description>
  309. </method>
  310. <method name="remove_line">
  311. <return type="bool" />
  312. <argument index="0" name="line" type="int" />
  313. <description>
  314. Removes a line of content from the label. Returns [code]true[/code] if the line exists.
  315. The [code]line[/code] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code].
  316. </description>
  317. </method>
  318. <method name="scroll_to_line">
  319. <return type="void" />
  320. <argument index="0" name="line" type="int" />
  321. <description>
  322. Scrolls the window's top line to match [code]line[/code].
  323. </description>
  324. </method>
  325. <method name="scroll_to_paragraph">
  326. <return type="void" />
  327. <argument index="0" name="paragraph" type="int" />
  328. <description>
  329. Scrolls the window's top line to match first line of the [code]paragraph[/code].
  330. </description>
  331. </method>
  332. <method name="set_cell_border_color">
  333. <return type="void" />
  334. <argument index="0" name="color" type="Color" />
  335. <description>
  336. Sets color of a table cell border.
  337. </description>
  338. </method>
  339. <method name="set_cell_padding">
  340. <return type="void" />
  341. <argument index="0" name="padding" type="Rect2" />
  342. <description>
  343. Sets inner padding of a table cell.
  344. </description>
  345. </method>
  346. <method name="set_cell_row_background_color">
  347. <return type="void" />
  348. <argument index="0" name="odd_row_bg" type="Color" />
  349. <argument index="1" name="even_row_bg" type="Color" />
  350. <description>
  351. Sets color of a table cell. Separate colors for alternating rows can be specified.
  352. </description>
  353. </method>
  354. <method name="set_cell_size_override">
  355. <return type="void" />
  356. <argument index="0" name="min_size" type="Vector2" />
  357. <argument index="1" name="max_size" type="Vector2" />
  358. <description>
  359. Sets minimum and maximum size overrides for a table cell.
  360. </description>
  361. </method>
  362. <method name="set_table_column_expand">
  363. <return type="void" />
  364. <argument index="0" name="column" type="int" />
  365. <argument index="1" name="expand" type="bool" />
  366. <argument index="2" name="ratio" type="int" />
  367. <description>
  368. Edits the selected column's expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios.
  369. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
  370. If [code]expand[/code] is [code]false[/code], the column will not contribute to the total ratio.
  371. </description>
  372. </method>
  373. </methods>
  374. <members>
  375. <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
  376. If [code]true[/code], the label uses BBCode formatting.
  377. </member>
  378. <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[]">
  379. The currently installed custom effects. This is an array of [RichTextEffect]s.
  380. To add a custom effect, it's more convenient to use [method install_effect].
  381. </member>
  382. <member name="deselect_on_focus_loss_enabled" type="bool" setter="set_deselect_on_focus_loss_enabled" getter="is_deselect_on_focus_loss_enabled" default="true">
  383. If [code]true[/code], the selected text will be deselected when focus is lost.
  384. </member>
  385. <member name="fit_content_height" type="bool" setter="set_fit_content_height" getter="is_fit_content_height_enabled" default="false">
  386. If [code]true[/code], the label's height will be automatically updated to fit its content.
  387. [b]Note:[/b] This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions.
  388. </member>
  389. <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
  390. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  391. </member>
  392. <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true">
  393. If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code].
  394. </member>
  395. <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
  396. If [code]true[/code], the label uses the custom font color.
  397. </member>
  398. <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
  399. The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.
  400. [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
  401. </member>
  402. <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
  403. <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true">
  404. If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line].
  405. </member>
  406. <member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following" default="false">
  407. If [code]true[/code], the window scrolls down to display new content automatically.
  408. </member>
  409. <member name="selection_enabled" type="bool" setter="set_selection_enabled" getter="is_selection_enabled" default="false">
  410. If [code]true[/code], the label allows text selection.
  411. </member>
  412. <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
  413. Set BiDi algorithm override for the structured text.
  414. </member>
  415. <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
  416. Set additional options for BiDi override.
  417. </member>
  418. <member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size" default="4">
  419. The number of spaces associated with a single tab length. Does not affect [code]\t[/code] in text tags, only indent tags.
  420. </member>
  421. <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
  422. The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
  423. [b]Note:[/b] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [code]text[/code] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
  424. </member>
  425. <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
  426. Base text writing direction.
  427. </member>
  428. <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
  429. The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
  430. [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
  431. </member>
  432. </members>
  433. <signals>
  434. <signal name="meta_clicked">
  435. <argument index="0" name="meta" type="Variant" />
  436. <description>
  437. Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack.
  438. </description>
  439. </signal>
  440. <signal name="meta_hover_ended">
  441. <argument index="0" name="meta" type="Variant" />
  442. <description>
  443. Triggers when the mouse exits a meta tag.
  444. </description>
  445. </signal>
  446. <signal name="meta_hover_started">
  447. <argument index="0" name="meta" type="Variant" />
  448. <description>
  449. Triggers when the mouse enters a meta tag.
  450. </description>
  451. </signal>
  452. </signals>
  453. <constants>
  454. <constant name="ALIGN_LEFT" value="0" enum="Align">
  455. Makes text left aligned.
  456. </constant>
  457. <constant name="ALIGN_CENTER" value="1" enum="Align">
  458. Makes text centered.
  459. </constant>
  460. <constant name="ALIGN_RIGHT" value="2" enum="Align">
  461. Makes text right aligned.
  462. </constant>
  463. <constant name="ALIGN_FILL" value="3" enum="Align">
  464. Makes text fill width.
  465. </constant>
  466. <constant name="LIST_NUMBERS" value="0" enum="ListType">
  467. Each list item has a number marker.
  468. </constant>
  469. <constant name="LIST_LETTERS" value="1" enum="ListType">
  470. Each list item has a letter marker.
  471. </constant>
  472. <constant name="LIST_ROMAN" value="2" enum="ListType">
  473. Each list item has a roman number marker.
  474. </constant>
  475. <constant name="LIST_DOTS" value="3" enum="ListType">
  476. Each list item has a filled circle marker.
  477. </constant>
  478. <constant name="ITEM_FRAME" value="0" enum="ItemType">
  479. </constant>
  480. <constant name="ITEM_TEXT" value="1" enum="ItemType">
  481. </constant>
  482. <constant name="ITEM_IMAGE" value="2" enum="ItemType">
  483. </constant>
  484. <constant name="ITEM_NEWLINE" value="3" enum="ItemType">
  485. </constant>
  486. <constant name="ITEM_FONT" value="4" enum="ItemType">
  487. </constant>
  488. <constant name="ITEM_FONT_SIZE" value="5" enum="ItemType">
  489. </constant>
  490. <constant name="ITEM_FONT_FEATURES" value="6" enum="ItemType">
  491. </constant>
  492. <constant name="ITEM_COLOR" value="7" enum="ItemType">
  493. </constant>
  494. <constant name="ITEM_OUTLINE_SIZE" value="8" enum="ItemType">
  495. </constant>
  496. <constant name="ITEM_OUTLINE_COLOR" value="9" enum="ItemType">
  497. </constant>
  498. <constant name="ITEM_UNDERLINE" value="10" enum="ItemType">
  499. </constant>
  500. <constant name="ITEM_STRIKETHROUGH" value="11" enum="ItemType">
  501. </constant>
  502. <constant name="ITEM_PARAGRAPH" value="12" enum="ItemType">
  503. </constant>
  504. <constant name="ITEM_INDENT" value="13" enum="ItemType">
  505. </constant>
  506. <constant name="ITEM_LIST" value="14" enum="ItemType">
  507. </constant>
  508. <constant name="ITEM_TABLE" value="15" enum="ItemType">
  509. </constant>
  510. <constant name="ITEM_FADE" value="16" enum="ItemType">
  511. </constant>
  512. <constant name="ITEM_SHAKE" value="17" enum="ItemType">
  513. </constant>
  514. <constant name="ITEM_WAVE" value="18" enum="ItemType">
  515. </constant>
  516. <constant name="ITEM_TORNADO" value="19" enum="ItemType">
  517. </constant>
  518. <constant name="ITEM_RAINBOW" value="20" enum="ItemType">
  519. </constant>
  520. <constant name="ITEM_BGCOLOR" value="21" enum="ItemType">
  521. </constant>
  522. <constant name="ITEM_FGCOLOR" value="22" enum="ItemType">
  523. </constant>
  524. <constant name="ITEM_META" value="23" enum="ItemType">
  525. </constant>
  526. <constant name="ITEM_DROPCAP" value="24" enum="ItemType">
  527. </constant>
  528. <constant name="ITEM_CUSTOMFX" value="25" enum="ItemType">
  529. </constant>
  530. </constants>
  531. <theme_items>
  532. <theme_item name="bold_font" data_type="font" type="Font">
  533. The font used for bold text.
  534. </theme_item>
  535. <theme_item name="bold_font_size" data_type="font_size" type="int">
  536. The font size used for bold text.
  537. </theme_item>
  538. <theme_item name="bold_italics_font" data_type="font" type="Font">
  539. The font used for bold italics text.
  540. </theme_item>
  541. <theme_item name="bold_italics_font_size" data_type="font_size" type="int">
  542. The font size used for bold italics text.
  543. </theme_item>
  544. <theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  545. The default text color.
  546. </theme_item>
  547. <theme_item name="focus" data_type="style" type="StyleBox">
  548. The background The background used when the [RichTextLabel] is focused.
  549. </theme_item>
  550. <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  551. The default tint of text outline.
  552. </theme_item>
  553. <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
  554. The color of selected text, used when [member selection_enabled] is [code]true[/code].
  555. </theme_item>
  556. <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
  557. The color of the font's shadow.
  558. </theme_item>
  559. <theme_item name="italics_font" data_type="font" type="Font">
  560. The font used for italics text.
  561. </theme_item>
  562. <theme_item name="italics_font_size" data_type="font_size" type="int">
  563. The font size used for italics text.
  564. </theme_item>
  565. <theme_item name="line_separation" data_type="constant" type="int" default="0">
  566. The vertical space between lines.
  567. </theme_item>
  568. <theme_item name="mono_font" data_type="font" type="Font">
  569. The font used for monospace text.
  570. </theme_item>
  571. <theme_item name="mono_font_size" data_type="font_size" type="int">
  572. The font size used for monospace text.
  573. </theme_item>
  574. <theme_item name="normal" data_type="style" type="StyleBox">
  575. The normal background for the [RichTextLabel].
  576. </theme_item>
  577. <theme_item name="normal_font" data_type="font" type="Font">
  578. The default text font.
  579. </theme_item>
  580. <theme_item name="normal_font_size" data_type="font_size" type="int">
  581. The default text font size.
  582. </theme_item>
  583. <theme_item name="outline_size" data_type="constant" type="int" default="0">
  584. The size of the text outline.
  585. </theme_item>
  586. <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)">
  587. The color of the selection box.
  588. </theme_item>
  589. <theme_item name="shadow_as_outline" data_type="constant" type="int" default="0">
  590. Boolean value. If 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline.
  591. </theme_item>
  592. <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1">
  593. The horizontal offset of the font's shadow.
  594. </theme_item>
  595. <theme_item name="shadow_offset_y" data_type="constant" type="int" default="1">
  596. The vertical offset of the font's shadow.
  597. </theme_item>
  598. <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
  599. The default cell border color.
  600. </theme_item>
  601. <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
  602. The default background color for even rows.
  603. </theme_item>
  604. <theme_item name="table_hseparation" data_type="constant" type="int" default="3">
  605. The horizontal separation of elements in a table.
  606. </theme_item>
  607. <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
  608. The default background color for odd rows.
  609. </theme_item>
  610. <theme_item name="table_vseparation" data_type="constant" type="int" default="3">
  611. The vertical separation of elements in a table.
  612. </theme_item>
  613. </theme_items>
  614. </class>