class_richtextlabel.rst 126 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RichTextLabel.xml.
  6. .. _class_RichTextLabel:
  7. RichTextLabel
  8. =============
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Label that displays rich text.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. \ **Note:** Assignments to :ref:`text<class_RichTextLabel_property_text>` clear the tag stack and reconstruct it from the property's contents. Any edits made to :ref:`text<class_RichTextLabel_property_text>` will erase previous edits made from other manual sources such as :ref:`append_text<class_RichTextLabel_method_append_text>` and the ``push_*`` / :ref:`pop<class_RichTextLabel_method_pop>` methods.
  16. \ **Note:** RichTextLabel doesn't support entangled BBCode tags. For example, instead of using ``[b]bold[i]bold italic[/b]italic[/i]``, use ``[b]bold[i]bold italic[/i][/b][i]italic[/i]``.
  17. \ **Note:** ``push_*/pop`` functions won't affect BBCode.
  18. \ **Note:** Unlike :ref:`Label<class_Label>`, RichTextLabel doesn't have a *property* to horizontally align text to the center. Instead, enable :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` and surround the text in a ``[center]`` tag as follows: ``[center]Example[/center]``. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the :ref:`fit_content_height<class_RichTextLabel_property_fit_content_height>` property.
  19. .. rst-class:: classref-introduction-group
  20. Tutorials
  21. ---------
  22. - :doc:`BBCode in RichTextLabel <../tutorials/ui/bbcode_in_richtextlabel>`
  23. - `GUI Rich Text/BBcode Demo <https://godotengine.org/asset-library/asset/132>`__
  24. - `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__
  25. .. rst-class:: classref-reftable-group
  26. Properties
  27. ----------
  28. .. table::
  29. :widths: auto
  30. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  31. | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`autowrap_mode<class_RichTextLabel_property_autowrap_mode>` | ``3`` |
  32. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` | ``false`` |
  34. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
  36. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_RichTextLabel_property_context_menu_enabled>` | ``false`` |
  38. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  39. | :ref:`Array<class_Array>` | :ref:`custom_effects<class_RichTextLabel_property_custom_effects>` | ``[]`` |
  40. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_RichTextLabel_property_deselect_on_focus_loss_enabled>` | ``true`` |
  42. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`fit_content_height<class_RichTextLabel_property_fit_content_height>` | ``false`` |
  44. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`hint_underlined<class_RichTextLabel_property_hint_underlined>` | ``true`` |
  46. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  47. | :ref:`String<class_String>` | :ref:`language<class_RichTextLabel_property_language>` | ``""`` |
  48. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` | ``true`` |
  50. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`progress_bar_delay<class_RichTextLabel_property_progress_bar_delay>` | ``1000`` |
  52. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`scroll_active<class_RichTextLabel_property_scroll_active>` | ``true`` |
  54. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  55. | :ref:`bool<class_bool>` | :ref:`scroll_following<class_RichTextLabel_property_scroll_following>` | ``false`` |
  56. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` | ``false`` |
  58. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  59. | :ref:`bool<class_bool>` | :ref:`shortcut_keys_enabled<class_RichTextLabel_property_shortcut_keys_enabled>` | ``true`` |
  60. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  61. | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_RichTextLabel_property_structured_text_bidi_override>` | ``0`` |
  62. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  63. | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_RichTextLabel_property_structured_text_bidi_override_options>` | ``[]`` |
  64. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  65. | :ref:`int<class_int>` | :ref:`tab_size<class_RichTextLabel_property_tab_size>` | ``4`` |
  66. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  67. | :ref:`String<class_String>` | :ref:`text<class_RichTextLabel_property_text>` | ``""`` |
  68. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  69. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_RichTextLabel_property_text_direction>` | ``0`` |
  70. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`threaded<class_RichTextLabel_property_threaded>` | ``false`` |
  72. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  73. | :ref:`int<class_int>` | :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` | ``-1`` |
  74. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  75. | :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` | :ref:`visible_characters_behavior<class_RichTextLabel_property_visible_characters_behavior>` | ``0`` |
  76. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  77. | :ref:`float<class_float>` | :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` | ``1.0`` |
  78. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  79. .. rst-class:: classref-reftable-group
  80. Methods
  81. -------
  82. .. table::
  83. :widths: auto
  84. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`add_image<class_RichTextLabel_method_add_image>` **(** :ref:`Texture2D<class_Texture2D>` image, :ref:`int<class_int>` width=0, :ref:`int<class_int>` height=0, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0) **)** |
  86. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`add_text<class_RichTextLabel_method_add_text>` **(** :ref:`String<class_String>` text **)** |
  88. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`append_text<class_RichTextLabel_method_append_text>` **(** :ref:`String<class_String>` bbcode **)** |
  90. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`clear<class_RichTextLabel_method_clear>` **(** **)** |
  92. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`deselect<class_RichTextLabel_method_deselect>` **(** **)** |
  94. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`int<class_int>` | :ref:`get_character_line<class_RichTextLabel_method_get_character_line>` **(** :ref:`int<class_int>` character **)** |
  96. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`int<class_int>` | :ref:`get_character_paragraph<class_RichTextLabel_method_get_character_paragraph>` **(** :ref:`int<class_int>` character **)** |
  98. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`int<class_int>` | :ref:`get_content_height<class_RichTextLabel_method_get_content_height>` **(** **)** |const| |
  100. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`int<class_int>` | :ref:`get_content_width<class_RichTextLabel_method_get_content_width>` **(** **)** |const| |
  102. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`int<class_int>` | :ref:`get_line_count<class_RichTextLabel_method_get_line_count>` **(** **)** |const| |
  104. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`float<class_float>` | :ref:`get_line_offset<class_RichTextLabel_method_get_line_offset>` **(** :ref:`int<class_int>` line **)** |
  106. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_RichTextLabel_method_get_menu>` **(** **)** |const| |
  108. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`int<class_int>` | :ref:`get_paragraph_count<class_RichTextLabel_method_get_paragraph_count>` **(** **)** |const| |
  110. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`float<class_float>` | :ref:`get_paragraph_offset<class_RichTextLabel_method_get_paragraph_offset>` **(** :ref:`int<class_int>` paragraph **)** |
  112. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | :ref:`String<class_String>` | :ref:`get_parsed_text<class_RichTextLabel_method_get_parsed_text>` **(** **)** |const| |
  114. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | :ref:`String<class_String>` | :ref:`get_selected_text<class_RichTextLabel_method_get_selected_text>` **(** **)** |const| |
  116. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`int<class_int>` | :ref:`get_selection_from<class_RichTextLabel_method_get_selection_from>` **(** **)** |const| |
  118. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`int<class_int>` | :ref:`get_selection_to<class_RichTextLabel_method_get_selection_to>` **(** **)** |const| |
  120. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`int<class_int>` | :ref:`get_total_character_count<class_RichTextLabel_method_get_total_character_count>` **(** **)** |const| |
  122. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_RichTextLabel_method_get_v_scroll_bar>` **(** **)** |
  124. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_RichTextLabel_method_get_visible_line_count>` **(** **)** |const| |
  126. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | :ref:`int<class_int>` | :ref:`get_visible_paragraph_count<class_RichTextLabel_method_get_visible_paragraph_count>` **(** **)** |const| |
  128. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | void | :ref:`install_effect<class_RichTextLabel_method_install_effect>` **(** :ref:`Variant<class_Variant>` effect **)** |
  130. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_RichTextLabel_method_is_menu_visible>` **(** **)** |const| |
  132. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | :ref:`bool<class_bool>` | :ref:`is_ready<class_RichTextLabel_method_is_ready>` **(** **)** |const| |
  134. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | void | :ref:`newline<class_RichTextLabel_method_newline>` **(** **)** |
  136. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | void | :ref:`parse_bbcode<class_RichTextLabel_method_parse_bbcode>` **(** :ref:`String<class_String>` bbcode **)** |
  138. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`Dictionary<class_Dictionary>` | :ref:`parse_expressions_for_values<class_RichTextLabel_method_parse_expressions_for_values>` **(** :ref:`PackedStringArray<class_PackedStringArray>` expressions **)** |
  140. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | void | :ref:`pop<class_RichTextLabel_method_pop>` **(** **)** |
  142. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | void | :ref:`push_bgcolor<class_RichTextLabel_method_push_bgcolor>` **(** :ref:`Color<class_Color>` bgcolor **)** |
  144. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | void | :ref:`push_bold<class_RichTextLabel_method_push_bold>` **(** **)** |
  146. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | void | :ref:`push_bold_italics<class_RichTextLabel_method_push_bold_italics>` **(** **)** |
  148. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | void | :ref:`push_cell<class_RichTextLabel_method_push_cell>` **(** **)** |
  150. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | void | :ref:`push_color<class_RichTextLabel_method_push_color>` **(** :ref:`Color<class_Color>` color **)** |
  152. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | void | :ref:`push_dropcap<class_RichTextLabel_method_push_dropcap>` **(** :ref:`String<class_String>` string, :ref:`Font<class_Font>` font, :ref:`int<class_int>` size, :ref:`Rect2<class_Rect2>` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`int<class_int>` outline_size=0, :ref:`Color<class_Color>` outline_color=Color(0, 0, 0, 0) **)** |
  154. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | void | :ref:`push_fgcolor<class_RichTextLabel_method_push_fgcolor>` **(** :ref:`Color<class_Color>` fgcolor **)** |
  156. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | void | :ref:`push_font<class_RichTextLabel_method_push_font>` **(** :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size **)** |
  158. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | void | :ref:`push_font_size<class_RichTextLabel_method_push_font_size>` **(** :ref:`int<class_int>` font_size **)** |
  160. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | void | :ref:`push_hint<class_RichTextLabel_method_push_hint>` **(** :ref:`String<class_String>` description **)** |
  162. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | void | :ref:`push_indent<class_RichTextLabel_method_push_indent>` **(** :ref:`int<class_int>` level **)** |
  164. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | void | :ref:`push_italics<class_RichTextLabel_method_push_italics>` **(** **)** |
  166. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`push_list<class_RichTextLabel_method_push_list>` **(** :ref:`int<class_int>` level, :ref:`ListType<enum_RichTextLabel_ListType>` type, :ref:`bool<class_bool>` capitalize **)** |
  168. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | void | :ref:`push_meta<class_RichTextLabel_method_push_meta>` **(** :ref:`Variant<class_Variant>` data **)** |
  170. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | void | :ref:`push_mono<class_RichTextLabel_method_push_mono>` **(** **)** |
  172. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | void | :ref:`push_normal<class_RichTextLabel_method_push_normal>` **(** **)** |
  174. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | void | :ref:`push_outline_color<class_RichTextLabel_method_push_outline_color>` **(** :ref:`Color<class_Color>` color **)** |
  176. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | void | :ref:`push_outline_size<class_RichTextLabel_method_push_outline_size>` **(** :ref:`int<class_int>` outline_size **)** |
  178. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | void | :ref:`push_paragraph<class_RichTextLabel_method_push_paragraph>` **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment, :ref:`TextDirection<enum_Control_TextDirection>` base_direction=0, :ref:`String<class_String>` language="", :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` st_parser=0 **)** |
  180. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | void | :ref:`push_strikethrough<class_RichTextLabel_method_push_strikethrough>` **(** **)** |
  182. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | void | :ref:`push_table<class_RichTextLabel_method_push_table>` **(** :ref:`int<class_int>` columns, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=0, :ref:`int<class_int>` align_to_row=-1 **)** |
  184. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | void | :ref:`push_underline<class_RichTextLabel_method_push_underline>` **(** **)** |
  186. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | :ref:`bool<class_bool>` | :ref:`remove_paragraph<class_RichTextLabel_method_remove_paragraph>` **(** :ref:`int<class_int>` paragraph **)** |
  188. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | void | :ref:`scroll_to_line<class_RichTextLabel_method_scroll_to_line>` **(** :ref:`int<class_int>` line **)** |
  190. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | void | :ref:`scroll_to_paragraph<class_RichTextLabel_method_scroll_to_paragraph>` **(** :ref:`int<class_int>` paragraph **)** |
  192. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | void | :ref:`scroll_to_selection<class_RichTextLabel_method_scroll_to_selection>` **(** **)** |
  194. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | void | :ref:`select_all<class_RichTextLabel_method_select_all>` **(** **)** |
  196. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | void | :ref:`set_cell_border_color<class_RichTextLabel_method_set_cell_border_color>` **(** :ref:`Color<class_Color>` color **)** |
  198. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | void | :ref:`set_cell_padding<class_RichTextLabel_method_set_cell_padding>` **(** :ref:`Rect2<class_Rect2>` padding **)** |
  200. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | void | :ref:`set_cell_row_background_color<class_RichTextLabel_method_set_cell_row_background_color>` **(** :ref:`Color<class_Color>` odd_row_bg, :ref:`Color<class_Color>` even_row_bg **)** |
  202. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | void | :ref:`set_cell_size_override<class_RichTextLabel_method_set_cell_size_override>` **(** :ref:`Vector2<class_Vector2>` min_size, :ref:`Vector2<class_Vector2>` max_size **)** |
  204. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | void | :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand, :ref:`int<class_int>` ratio **)** |
  206. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. .. rst-class:: classref-reftable-group
  208. Theme Properties
  209. ----------------
  210. .. table::
  211. :widths: auto
  212. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  213. | :ref:`Color<class_Color>` | :ref:`default_color<class_RichTextLabel_theme_color_default_color>` | ``Color(1, 1, 1, 1)`` |
  214. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  215. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_RichTextLabel_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` |
  216. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  217. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_RichTextLabel_theme_color_font_selected_color>` | ``Color(0, 0, 0, 0)`` |
  218. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  219. | :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_RichTextLabel_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 0)`` |
  220. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  221. | :ref:`Color<class_Color>` | :ref:`selection_color<class_RichTextLabel_theme_color_selection_color>` | ``Color(0.1, 0.1, 1, 0.8)`` |
  222. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  223. | :ref:`Color<class_Color>` | :ref:`table_border<class_RichTextLabel_theme_color_table_border>` | ``Color(0, 0, 0, 0)`` |
  224. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  225. | :ref:`Color<class_Color>` | :ref:`table_even_row_bg<class_RichTextLabel_theme_color_table_even_row_bg>` | ``Color(0, 0, 0, 0)`` |
  226. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  227. | :ref:`Color<class_Color>` | :ref:`table_odd_row_bg<class_RichTextLabel_theme_color_table_odd_row_bg>` | ``Color(0, 0, 0, 0)`` |
  228. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  229. | :ref:`int<class_int>` | :ref:`line_separation<class_RichTextLabel_theme_constant_line_separation>` | ``0`` |
  230. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  231. | :ref:`int<class_int>` | :ref:`outline_size<class_RichTextLabel_theme_constant_outline_size>` | ``0`` |
  232. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  233. | :ref:`int<class_int>` | :ref:`shadow_offset_x<class_RichTextLabel_theme_constant_shadow_offset_x>` | ``1`` |
  234. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  235. | :ref:`int<class_int>` | :ref:`shadow_offset_y<class_RichTextLabel_theme_constant_shadow_offset_y>` | ``1`` |
  236. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  237. | :ref:`int<class_int>` | :ref:`shadow_outline_size<class_RichTextLabel_theme_constant_shadow_outline_size>` | ``1`` |
  238. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  239. | :ref:`int<class_int>` | :ref:`table_h_separation<class_RichTextLabel_theme_constant_table_h_separation>` | ``3`` |
  240. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  241. | :ref:`int<class_int>` | :ref:`table_v_separation<class_RichTextLabel_theme_constant_table_v_separation>` | ``3`` |
  242. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  243. | :ref:`int<class_int>` | :ref:`text_highlight_h_padding<class_RichTextLabel_theme_constant_text_highlight_h_padding>` | ``3`` |
  244. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  245. | :ref:`int<class_int>` | :ref:`text_highlight_v_padding<class_RichTextLabel_theme_constant_text_highlight_v_padding>` | ``3`` |
  246. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  247. | :ref:`Font<class_Font>` | :ref:`bold_font<class_RichTextLabel_theme_font_bold_font>` | |
  248. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  249. | :ref:`Font<class_Font>` | :ref:`bold_italics_font<class_RichTextLabel_theme_font_bold_italics_font>` | |
  250. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  251. | :ref:`Font<class_Font>` | :ref:`italics_font<class_RichTextLabel_theme_font_italics_font>` | |
  252. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  253. | :ref:`Font<class_Font>` | :ref:`mono_font<class_RichTextLabel_theme_font_mono_font>` | |
  254. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  255. | :ref:`Font<class_Font>` | :ref:`normal_font<class_RichTextLabel_theme_font_normal_font>` | |
  256. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  257. | :ref:`int<class_int>` | :ref:`bold_font_size<class_RichTextLabel_theme_font_size_bold_font_size>` | |
  258. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  259. | :ref:`int<class_int>` | :ref:`bold_italics_font_size<class_RichTextLabel_theme_font_size_bold_italics_font_size>` | |
  260. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  261. | :ref:`int<class_int>` | :ref:`italics_font_size<class_RichTextLabel_theme_font_size_italics_font_size>` | |
  262. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  263. | :ref:`int<class_int>` | :ref:`mono_font_size<class_RichTextLabel_theme_font_size_mono_font_size>` | |
  264. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  265. | :ref:`int<class_int>` | :ref:`normal_font_size<class_RichTextLabel_theme_font_size_normal_font_size>` | |
  266. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  267. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_RichTextLabel_theme_style_focus>` | |
  268. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  269. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_RichTextLabel_theme_style_normal>` | |
  270. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  271. .. rst-class:: classref-section-separator
  272. ----
  273. .. rst-class:: classref-descriptions-group
  274. Signals
  275. -------
  276. .. _class_RichTextLabel_signal_finished:
  277. .. rst-class:: classref-signal
  278. **finished** **(** **)**
  279. Triggered when the document is fully loaded.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _class_RichTextLabel_signal_meta_clicked:
  283. .. rst-class:: classref-signal
  284. **meta_clicked** **(** :ref:`Variant<class_Variant>` meta **)**
  285. Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. ``[url={"data"="hi"}]hi[/url]``, then the parameter for this signal will be a :ref:`String<class_String>` type. If a particular type or an object is desired, the :ref:`push_meta<class_RichTextLabel_method_push_meta>` method must be used to manually insert the data into the tag stack.
  286. .. rst-class:: classref-item-separator
  287. ----
  288. .. _class_RichTextLabel_signal_meta_hover_ended:
  289. .. rst-class:: classref-signal
  290. **meta_hover_ended** **(** :ref:`Variant<class_Variant>` meta **)**
  291. Triggers when the mouse exits a meta tag.
  292. .. rst-class:: classref-item-separator
  293. ----
  294. .. _class_RichTextLabel_signal_meta_hover_started:
  295. .. rst-class:: classref-signal
  296. **meta_hover_started** **(** :ref:`Variant<class_Variant>` meta **)**
  297. Triggers when the mouse enters a meta tag.
  298. .. rst-class:: classref-section-separator
  299. ----
  300. .. rst-class:: classref-descriptions-group
  301. Enumerations
  302. ------------
  303. .. _enum_RichTextLabel_ListType:
  304. .. rst-class:: classref-enumeration
  305. enum **ListType**:
  306. .. _class_RichTextLabel_constant_LIST_NUMBERS:
  307. .. rst-class:: classref-enumeration-constant
  308. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_NUMBERS** = ``0``
  309. Each list item has a number marker.
  310. .. _class_RichTextLabel_constant_LIST_LETTERS:
  311. .. rst-class:: classref-enumeration-constant
  312. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_LETTERS** = ``1``
  313. Each list item has a letter marker.
  314. .. _class_RichTextLabel_constant_LIST_ROMAN:
  315. .. rst-class:: classref-enumeration-constant
  316. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_ROMAN** = ``2``
  317. Each list item has a roman number marker.
  318. .. _class_RichTextLabel_constant_LIST_DOTS:
  319. .. rst-class:: classref-enumeration-constant
  320. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_DOTS** = ``3``
  321. Each list item has a filled circle marker.
  322. .. rst-class:: classref-item-separator
  323. ----
  324. .. _enum_RichTextLabel_ItemType:
  325. .. rst-class:: classref-enumeration
  326. enum **ItemType**:
  327. .. _class_RichTextLabel_constant_ITEM_FRAME:
  328. .. rst-class:: classref-enumeration-constant
  329. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_FRAME** = ``0``
  330. .. _class_RichTextLabel_constant_ITEM_TEXT:
  331. .. rst-class:: classref-enumeration-constant
  332. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_TEXT** = ``1``
  333. .. _class_RichTextLabel_constant_ITEM_IMAGE:
  334. .. rst-class:: classref-enumeration-constant
  335. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_IMAGE** = ``2``
  336. .. _class_RichTextLabel_constant_ITEM_NEWLINE:
  337. .. rst-class:: classref-enumeration-constant
  338. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_NEWLINE** = ``3``
  339. .. _class_RichTextLabel_constant_ITEM_FONT:
  340. .. rst-class:: classref-enumeration-constant
  341. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_FONT** = ``4``
  342. .. _class_RichTextLabel_constant_ITEM_FONT_SIZE:
  343. .. rst-class:: classref-enumeration-constant
  344. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_FONT_SIZE** = ``5``
  345. .. _class_RichTextLabel_constant_ITEM_FONT_FEATURES:
  346. .. rst-class:: classref-enumeration-constant
  347. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_FONT_FEATURES** = ``6``
  348. .. _class_RichTextLabel_constant_ITEM_COLOR:
  349. .. rst-class:: classref-enumeration-constant
  350. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_COLOR** = ``7``
  351. .. _class_RichTextLabel_constant_ITEM_OUTLINE_SIZE:
  352. .. rst-class:: classref-enumeration-constant
  353. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_OUTLINE_SIZE** = ``8``
  354. .. _class_RichTextLabel_constant_ITEM_OUTLINE_COLOR:
  355. .. rst-class:: classref-enumeration-constant
  356. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_OUTLINE_COLOR** = ``9``
  357. .. _class_RichTextLabel_constant_ITEM_UNDERLINE:
  358. .. rst-class:: classref-enumeration-constant
  359. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_UNDERLINE** = ``10``
  360. .. _class_RichTextLabel_constant_ITEM_STRIKETHROUGH:
  361. .. rst-class:: classref-enumeration-constant
  362. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_STRIKETHROUGH** = ``11``
  363. .. _class_RichTextLabel_constant_ITEM_PARAGRAPH:
  364. .. rst-class:: classref-enumeration-constant
  365. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_PARAGRAPH** = ``12``
  366. .. _class_RichTextLabel_constant_ITEM_INDENT:
  367. .. rst-class:: classref-enumeration-constant
  368. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_INDENT** = ``13``
  369. .. _class_RichTextLabel_constant_ITEM_LIST:
  370. .. rst-class:: classref-enumeration-constant
  371. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_LIST** = ``14``
  372. .. _class_RichTextLabel_constant_ITEM_TABLE:
  373. .. rst-class:: classref-enumeration-constant
  374. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_TABLE** = ``15``
  375. .. _class_RichTextLabel_constant_ITEM_FADE:
  376. .. rst-class:: classref-enumeration-constant
  377. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_FADE** = ``16``
  378. .. _class_RichTextLabel_constant_ITEM_SHAKE:
  379. .. rst-class:: classref-enumeration-constant
  380. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_SHAKE** = ``17``
  381. .. _class_RichTextLabel_constant_ITEM_WAVE:
  382. .. rst-class:: classref-enumeration-constant
  383. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_WAVE** = ``18``
  384. .. _class_RichTextLabel_constant_ITEM_TORNADO:
  385. .. rst-class:: classref-enumeration-constant
  386. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_TORNADO** = ``19``
  387. .. _class_RichTextLabel_constant_ITEM_RAINBOW:
  388. .. rst-class:: classref-enumeration-constant
  389. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_RAINBOW** = ``20``
  390. .. _class_RichTextLabel_constant_ITEM_BGCOLOR:
  391. .. rst-class:: classref-enumeration-constant
  392. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_BGCOLOR** = ``21``
  393. .. _class_RichTextLabel_constant_ITEM_FGCOLOR:
  394. .. rst-class:: classref-enumeration-constant
  395. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_FGCOLOR** = ``22``
  396. .. _class_RichTextLabel_constant_ITEM_META:
  397. .. rst-class:: classref-enumeration-constant
  398. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_META** = ``23``
  399. .. _class_RichTextLabel_constant_ITEM_HINT:
  400. .. rst-class:: classref-enumeration-constant
  401. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_HINT** = ``24``
  402. .. _class_RichTextLabel_constant_ITEM_DROPCAP:
  403. .. rst-class:: classref-enumeration-constant
  404. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_DROPCAP** = ``25``
  405. .. _class_RichTextLabel_constant_ITEM_CUSTOMFX:
  406. .. rst-class:: classref-enumeration-constant
  407. :ref:`ItemType<enum_RichTextLabel_ItemType>` **ITEM_CUSTOMFX** = ``26``
  408. .. rst-class:: classref-section-separator
  409. ----
  410. .. rst-class:: classref-descriptions-group
  411. Property Descriptions
  412. ---------------------
  413. .. _class_RichTextLabel_property_autowrap_mode:
  414. .. rst-class:: classref-property
  415. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3``
  416. .. rst-class:: classref-property-setget
  417. - void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)**
  418. - :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)**
  419. If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`.
  420. .. rst-class:: classref-item-separator
  421. ----
  422. .. _class_RichTextLabel_property_bbcode_enabled:
  423. .. rst-class:: classref-property
  424. :ref:`bool<class_bool>` **bbcode_enabled** = ``false``
  425. .. rst-class:: classref-property-setget
  426. - void **set_use_bbcode** **(** :ref:`bool<class_bool>` value **)**
  427. - :ref:`bool<class_bool>` **is_using_bbcode** **(** **)**
  428. If ``true``, the label uses BBCode formatting.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_RichTextLabel_property_context_menu_enabled:
  432. .. rst-class:: classref-property
  433. :ref:`bool<class_bool>` **context_menu_enabled** = ``false``
  434. .. rst-class:: classref-property-setget
  435. - void **set_context_menu_enabled** **(** :ref:`bool<class_bool>` value **)**
  436. - :ref:`bool<class_bool>` **is_context_menu_enabled** **(** **)**
  437. If ``true``, a right-click displays the context menu.
  438. .. rst-class:: classref-item-separator
  439. ----
  440. .. _class_RichTextLabel_property_custom_effects:
  441. .. rst-class:: classref-property
  442. :ref:`Array<class_Array>` **custom_effects** = ``[]``
  443. .. rst-class:: classref-property-setget
  444. - void **set_effects** **(** :ref:`Array<class_Array>` value **)**
  445. - :ref:`Array<class_Array>` **get_effects** **(** **)**
  446. The currently installed custom effects. This is an array of :ref:`RichTextEffect<class_RichTextEffect>`\ s.
  447. To add a custom effect, it's more convenient to use :ref:`install_effect<class_RichTextLabel_method_install_effect>`.
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_RichTextLabel_property_deselect_on_focus_loss_enabled:
  451. .. rst-class:: classref-property
  452. :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true``
  453. .. rst-class:: classref-property-setget
  454. - void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool<class_bool>` value **)**
  455. - :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled** **(** **)**
  456. If ``true``, the selected text will be deselected when focus is lost.
  457. .. rst-class:: classref-item-separator
  458. ----
  459. .. _class_RichTextLabel_property_fit_content_height:
  460. .. rst-class:: classref-property
  461. :ref:`bool<class_bool>` **fit_content_height** = ``false``
  462. .. rst-class:: classref-property-setget
  463. - void **set_fit_content_height** **(** :ref:`bool<class_bool>` value **)**
  464. - :ref:`bool<class_bool>` **is_fit_content_height_enabled** **(** **)**
  465. If ``true``, the label's height will be automatically updated to fit its content.
  466. \ **Note:** This property is used as a workaround to fix issues with **RichTextLabel** in :ref:`Container<class_Container>`\ s, but it's unreliable in some cases and will be removed in future versions.
  467. .. rst-class:: classref-item-separator
  468. ----
  469. .. _class_RichTextLabel_property_hint_underlined:
  470. .. rst-class:: classref-property
  471. :ref:`bool<class_bool>` **hint_underlined** = ``true``
  472. .. rst-class:: classref-property-setget
  473. - void **set_hint_underline** **(** :ref:`bool<class_bool>` value **)**
  474. - :ref:`bool<class_bool>` **is_hint_underlined** **(** **)**
  475. If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/hint]``.
  476. .. rst-class:: classref-item-separator
  477. ----
  478. .. _class_RichTextLabel_property_language:
  479. .. rst-class:: classref-property
  480. :ref:`String<class_String>` **language** = ``""``
  481. .. rst-class:: classref-property-setget
  482. - void **set_language** **(** :ref:`String<class_String>` value **)**
  483. - :ref:`String<class_String>` **get_language** **(** **)**
  484. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_RichTextLabel_property_meta_underlined:
  488. .. rst-class:: classref-property
  489. :ref:`bool<class_bool>` **meta_underlined** = ``true``
  490. .. rst-class:: classref-property-setget
  491. - void **set_meta_underline** **(** :ref:`bool<class_bool>` value **)**
  492. - :ref:`bool<class_bool>` **is_meta_underlined** **(** **)**
  493. If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``.
  494. .. rst-class:: classref-item-separator
  495. ----
  496. .. _class_RichTextLabel_property_progress_bar_delay:
  497. .. rst-class:: classref-property
  498. :ref:`int<class_int>` **progress_bar_delay** = ``1000``
  499. .. rst-class:: classref-property-setget
  500. - void **set_progress_bar_delay** **(** :ref:`int<class_int>` value **)**
  501. - :ref:`int<class_int>` **get_progress_bar_delay** **(** **)**
  502. The delay after which the loading progress bar is displayed, in milliseconds. Set to ``-1`` to disable progress bar entirely.
  503. \ **Note:** Progress bar is displayed only if :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled.
  504. .. rst-class:: classref-item-separator
  505. ----
  506. .. _class_RichTextLabel_property_scroll_active:
  507. .. rst-class:: classref-property
  508. :ref:`bool<class_bool>` **scroll_active** = ``true``
  509. .. rst-class:: classref-property-setget
  510. - void **set_scroll_active** **(** :ref:`bool<class_bool>` value **)**
  511. - :ref:`bool<class_bool>` **is_scroll_active** **(** **)**
  512. If ``true``, the scrollbar is visible. Setting this to ``false`` does not block scrolling completely. See :ref:`scroll_to_line<class_RichTextLabel_method_scroll_to_line>`.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_RichTextLabel_property_scroll_following:
  516. .. rst-class:: classref-property
  517. :ref:`bool<class_bool>` **scroll_following** = ``false``
  518. .. rst-class:: classref-property-setget
  519. - void **set_scroll_follow** **(** :ref:`bool<class_bool>` value **)**
  520. - :ref:`bool<class_bool>` **is_scroll_following** **(** **)**
  521. If ``true``, the window scrolls down to display new content automatically.
  522. .. rst-class:: classref-item-separator
  523. ----
  524. .. _class_RichTextLabel_property_selection_enabled:
  525. .. rst-class:: classref-property
  526. :ref:`bool<class_bool>` **selection_enabled** = ``false``
  527. .. rst-class:: classref-property-setget
  528. - void **set_selection_enabled** **(** :ref:`bool<class_bool>` value **)**
  529. - :ref:`bool<class_bool>` **is_selection_enabled** **(** **)**
  530. If ``true``, the label allows text selection.
  531. .. rst-class:: classref-item-separator
  532. ----
  533. .. _class_RichTextLabel_property_shortcut_keys_enabled:
  534. .. rst-class:: classref-property
  535. :ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true``
  536. .. rst-class:: classref-property-setget
  537. - void **set_shortcut_keys_enabled** **(** :ref:`bool<class_bool>` value **)**
  538. - :ref:`bool<class_bool>` **is_shortcut_keys_enabled** **(** **)**
  539. If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled.
  540. .. rst-class:: classref-item-separator
  541. ----
  542. .. _class_RichTextLabel_property_structured_text_bidi_override:
  543. .. rst-class:: classref-property
  544. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0``
  545. .. rst-class:: classref-property-setget
  546. - void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)**
  547. - :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)**
  548. Set BiDi algorithm override for the structured text.
  549. .. rst-class:: classref-item-separator
  550. ----
  551. .. _class_RichTextLabel_property_structured_text_bidi_override_options:
  552. .. rst-class:: classref-property
  553. :ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]``
  554. .. rst-class:: classref-property-setget
  555. - void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)**
  556. - :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)**
  557. Set additional options for BiDi override.
  558. .. rst-class:: classref-item-separator
  559. ----
  560. .. _class_RichTextLabel_property_tab_size:
  561. .. rst-class:: classref-property
  562. :ref:`int<class_int>` **tab_size** = ``4``
  563. .. rst-class:: classref-property-setget
  564. - void **set_tab_size** **(** :ref:`int<class_int>` value **)**
  565. - :ref:`int<class_int>` **get_tab_size** **(** **)**
  566. The number of spaces associated with a single tab length. Does not affect ``\t`` in text tags, only indent tags.
  567. .. rst-class:: classref-item-separator
  568. ----
  569. .. _class_RichTextLabel_property_text:
  570. .. rst-class:: classref-property
  571. :ref:`String<class_String>` **text** = ``""``
  572. .. rst-class:: classref-property-setget
  573. - void **set_text** **(** :ref:`String<class_String>` value **)**
  574. - :ref:`String<class_String>` **get_text** **(** **)**
  575. 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.
  576. \ **Note:** If :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` is ``true``, it is unadvised to use the ``+=`` operator with ``text`` (e.g. ``text += "some string"``) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using ``push_*`` methods. Use :ref:`append_text<class_RichTextLabel_method_append_text>` for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
  577. .. rst-class:: classref-item-separator
  578. ----
  579. .. _class_RichTextLabel_property_text_direction:
  580. .. rst-class:: classref-property
  581. :ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0``
  582. .. rst-class:: classref-property-setget
  583. - void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)**
  584. - :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)**
  585. Base text writing direction.
  586. .. rst-class:: classref-item-separator
  587. ----
  588. .. _class_RichTextLabel_property_threaded:
  589. .. rst-class:: classref-property
  590. :ref:`bool<class_bool>` **threaded** = ``false``
  591. .. rst-class:: classref-property-setget
  592. - void **set_threaded** **(** :ref:`bool<class_bool>` value **)**
  593. - :ref:`bool<class_bool>` **is_threaded** **(** **)**
  594. If ``true``, text processing is done in a background thread.
  595. .. rst-class:: classref-item-separator
  596. ----
  597. .. _class_RichTextLabel_property_visible_characters:
  598. .. rst-class:: classref-property
  599. :ref:`int<class_int>` **visible_characters** = ``-1``
  600. .. rst-class:: classref-property-setget
  601. - void **set_visible_characters** **(** :ref:`int<class_int>` value **)**
  602. - :ref:`int<class_int>` **get_visible_characters** **(** **)**
  603. The number of characters to display. If set to ``-1``, all characters are displayed. This can be useful when animating the text appearing in a dialog box.
  604. \ **Note:** Setting this property updates :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` accordingly.
  605. .. rst-class:: classref-item-separator
  606. ----
  607. .. _class_RichTextLabel_property_visible_characters_behavior:
  608. .. rst-class:: classref-property
  609. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **visible_characters_behavior** = ``0``
  610. .. rst-class:: classref-property-setget
  611. - void **set_visible_characters_behavior** **(** :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` value **)**
  612. - :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **get_visible_characters_behavior** **(** **)**
  613. Sets the clipping behavior when :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` or :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` is set. See :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` for more info.
  614. .. rst-class:: classref-item-separator
  615. ----
  616. .. _class_RichTextLabel_property_visible_ratio:
  617. .. rst-class:: classref-property
  618. :ref:`float<class_float>` **visible_ratio** = ``1.0``
  619. .. rst-class:: classref-property-setget
  620. - void **set_visible_ratio** **(** :ref:`float<class_float>` value **)**
  621. - :ref:`float<class_float>` **get_visible_ratio** **(** **)**
  622. The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count<class_RichTextLabel_method_get_total_character_count>`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box.
  623. \ **Note:** Setting this property updates :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` accordingly.
  624. .. rst-class:: classref-section-separator
  625. ----
  626. .. rst-class:: classref-descriptions-group
  627. Method Descriptions
  628. -------------------
  629. .. _class_RichTextLabel_method_add_image:
  630. .. rst-class:: classref-method
  631. void **add_image** **(** :ref:`Texture2D<class_Texture2D>` image, :ref:`int<class_int>` width=0, :ref:`int<class_int>` height=0, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0) **)**
  632. Adds an image's opening and closing tags to the tag stack, optionally providing a ``width`` and ``height`` to resize the image, a ``color`` to tint the image and a ``region`` to only use parts of the image.
  633. If ``width`` or ``height`` is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
  634. If ``width`` and ``height`` are not set, but ``region`` is, the region's rect will be used.
  635. .. rst-class:: classref-item-separator
  636. ----
  637. .. _class_RichTextLabel_method_add_text:
  638. .. rst-class:: classref-method
  639. void **add_text** **(** :ref:`String<class_String>` text **)**
  640. Adds raw non-BBCode-parsed text to the tag stack.
  641. .. rst-class:: classref-item-separator
  642. ----
  643. .. _class_RichTextLabel_method_append_text:
  644. .. rst-class:: classref-method
  645. void **append_text** **(** :ref:`String<class_String>` bbcode **)**
  646. Parses ``bbcode`` and adds tags to the tag stack as needed.
  647. \ **Note:** Using this method, you can't close a tag that was opened in a previous :ref:`append_text<class_RichTextLabel_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 :ref:`text<class_RichTextLabel_property_text>` instead of using :ref:`append_text<class_RichTextLabel_method_append_text>`.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _class_RichTextLabel_method_clear:
  651. .. rst-class:: classref-method
  652. void **clear** **(** **)**
  653. Clears the tag stack and sets :ref:`text<class_RichTextLabel_property_text>` to an empty string.
  654. .. rst-class:: classref-item-separator
  655. ----
  656. .. _class_RichTextLabel_method_deselect:
  657. .. rst-class:: classref-method
  658. void **deselect** **(** **)**
  659. Clears the current selection.
  660. .. rst-class:: classref-item-separator
  661. ----
  662. .. _class_RichTextLabel_method_get_character_line:
  663. .. rst-class:: classref-method
  664. :ref:`int<class_int>` **get_character_line** **(** :ref:`int<class_int>` character **)**
  665. Returns the line number of the character position provided.
  666. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  667. .. rst-class:: classref-item-separator
  668. ----
  669. .. _class_RichTextLabel_method_get_character_paragraph:
  670. .. rst-class:: classref-method
  671. :ref:`int<class_int>` **get_character_paragraph** **(** :ref:`int<class_int>` character **)**
  672. Returns the paragraph number of the character position provided.
  673. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  674. .. rst-class:: classref-item-separator
  675. ----
  676. .. _class_RichTextLabel_method_get_content_height:
  677. .. rst-class:: classref-method
  678. :ref:`int<class_int>` **get_content_height** **(** **)** |const|
  679. Returns the height of the content.
  680. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  681. .. rst-class:: classref-item-separator
  682. ----
  683. .. _class_RichTextLabel_method_get_content_width:
  684. .. rst-class:: classref-method
  685. :ref:`int<class_int>` **get_content_width** **(** **)** |const|
  686. Returns the width of the content.
  687. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_RichTextLabel_method_get_line_count:
  691. .. rst-class:: classref-method
  692. :ref:`int<class_int>` **get_line_count** **(** **)** |const|
  693. Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
  694. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  695. .. rst-class:: classref-item-separator
  696. ----
  697. .. _class_RichTextLabel_method_get_line_offset:
  698. .. rst-class:: classref-method
  699. :ref:`float<class_float>` **get_line_offset** **(** :ref:`int<class_int>` line **)**
  700. Returns the vertical offset of the line found at the provided index.
  701. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  702. .. rst-class:: classref-item-separator
  703. ----
  704. .. _class_RichTextLabel_method_get_menu:
  705. .. rst-class:: classref-method
  706. :ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const|
  707. Returns the :ref:`PopupMenu<class_PopupMenu>` of this **RichTextLabel**. By default, this menu is displayed when right-clicking on the **RichTextLabel**.
  708. \ **Warning:** 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 :ref:`Window.visible<class_Window_property_visible>` property.
  709. .. rst-class:: classref-item-separator
  710. ----
  711. .. _class_RichTextLabel_method_get_paragraph_count:
  712. .. rst-class:: classref-method
  713. :ref:`int<class_int>` **get_paragraph_count** **(** **)** |const|
  714. Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack's text tags). Considers wrapped text as one paragraph.
  715. .. rst-class:: classref-item-separator
  716. ----
  717. .. _class_RichTextLabel_method_get_paragraph_offset:
  718. .. rst-class:: classref-method
  719. :ref:`float<class_float>` **get_paragraph_offset** **(** :ref:`int<class_int>` paragraph **)**
  720. Returns the vertical offset of the paragraph found at the provided index.
  721. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  722. .. rst-class:: classref-item-separator
  723. ----
  724. .. _class_RichTextLabel_method_get_parsed_text:
  725. .. rst-class:: classref-method
  726. :ref:`String<class_String>` **get_parsed_text** **(** **)** |const|
  727. Returns the text without BBCode mark-up.
  728. .. rst-class:: classref-item-separator
  729. ----
  730. .. _class_RichTextLabel_method_get_selected_text:
  731. .. rst-class:: classref-method
  732. :ref:`String<class_String>` **get_selected_text** **(** **)** |const|
  733. Returns the current selection text. Does not include BBCodes.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_RichTextLabel_method_get_selection_from:
  737. .. rst-class:: classref-method
  738. :ref:`int<class_int>` **get_selection_from** **(** **)** |const|
  739. Returns the current selection first character index if a selection is active, ``-1`` otherwise. Does not include BBCodes.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _class_RichTextLabel_method_get_selection_to:
  743. .. rst-class:: classref-method
  744. :ref:`int<class_int>` **get_selection_to** **(** **)** |const|
  745. Returns the current selection last character index if a selection is active, ``-1`` otherwise. Does not include BBCodes.
  746. .. rst-class:: classref-item-separator
  747. ----
  748. .. _class_RichTextLabel_method_get_total_character_count:
  749. .. rst-class:: classref-method
  750. :ref:`int<class_int>` **get_total_character_count** **(** **)** |const|
  751. Returns the total number of characters from text tags. Does not include BBCodes.
  752. .. rst-class:: classref-item-separator
  753. ----
  754. .. _class_RichTextLabel_method_get_v_scroll_bar:
  755. .. rst-class:: classref-method
  756. :ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar** **(** **)**
  757. Returns the vertical scrollbar.
  758. \ **Warning:** 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 :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  759. .. rst-class:: classref-item-separator
  760. ----
  761. .. _class_RichTextLabel_method_get_visible_line_count:
  762. .. rst-class:: classref-method
  763. :ref:`int<class_int>` **get_visible_line_count** **(** **)** |const|
  764. Returns the number of visible lines.
  765. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  766. .. rst-class:: classref-item-separator
  767. ----
  768. .. _class_RichTextLabel_method_get_visible_paragraph_count:
  769. .. rst-class:: classref-method
  770. :ref:`int<class_int>` **get_visible_paragraph_count** **(** **)** |const|
  771. Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
  772. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  773. .. rst-class:: classref-item-separator
  774. ----
  775. .. _class_RichTextLabel_method_install_effect:
  776. .. rst-class:: classref-method
  777. void **install_effect** **(** :ref:`Variant<class_Variant>` effect **)**
  778. Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect<class_RichTextEffect>`.
  779. .. rst-class:: classref-item-separator
  780. ----
  781. .. _class_RichTextLabel_method_is_menu_visible:
  782. .. rst-class:: classref-method
  783. :ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const|
  784. Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided).
  785. .. rst-class:: classref-item-separator
  786. ----
  787. .. _class_RichTextLabel_method_is_ready:
  788. .. rst-class:: classref-method
  789. :ref:`bool<class_bool>` **is_ready** **(** **)** |const|
  790. If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``.
  791. .. rst-class:: classref-item-separator
  792. ----
  793. .. _class_RichTextLabel_method_newline:
  794. .. rst-class:: classref-method
  795. void **newline** **(** **)**
  796. Adds a newline tag to the tag stack.
  797. .. rst-class:: classref-item-separator
  798. ----
  799. .. _class_RichTextLabel_method_parse_bbcode:
  800. .. rst-class:: classref-method
  801. void **parse_bbcode** **(** :ref:`String<class_String>` bbcode **)**
  802. The assignment version of :ref:`append_text<class_RichTextLabel_method_append_text>`. Clears the tag stack and inserts the new content.
  803. .. rst-class:: classref-item-separator
  804. ----
  805. .. _class_RichTextLabel_method_parse_expressions_for_values:
  806. .. rst-class:: classref-method
  807. :ref:`Dictionary<class_Dictionary>` **parse_expressions_for_values** **(** :ref:`PackedStringArray<class_PackedStringArray>` expressions **)**
  808. Parses BBCode parameter ``expressions`` into a dictionary.
  809. .. rst-class:: classref-item-separator
  810. ----
  811. .. _class_RichTextLabel_method_pop:
  812. .. rst-class:: classref-method
  813. void **pop** **(** **)**
  814. Terminates the current tag. Use after ``push_*`` methods to close BBCodes manually. Does not need to follow ``add_*`` methods.
  815. .. rst-class:: classref-item-separator
  816. ----
  817. .. _class_RichTextLabel_method_push_bgcolor:
  818. .. rst-class:: classref-method
  819. void **push_bgcolor** **(** :ref:`Color<class_Color>` bgcolor **)**
  820. Adds a ``[bgcolor]`` tag to the tag stack.
  821. .. rst-class:: classref-item-separator
  822. ----
  823. .. _class_RichTextLabel_method_push_bold:
  824. .. rst-class:: classref-method
  825. void **push_bold** **(** **)**
  826. Adds a ``[font]`` tag with a bold font to the tag stack. This is the same as adding a ``[b]`` tag if not currently in a ``[i]`` tag.
  827. .. rst-class:: classref-item-separator
  828. ----
  829. .. _class_RichTextLabel_method_push_bold_italics:
  830. .. rst-class:: classref-method
  831. void **push_bold_italics** **(** **)**
  832. Adds a ``[font]`` tag with a bold italics font to the tag stack.
  833. .. rst-class:: classref-item-separator
  834. ----
  835. .. _class_RichTextLabel_method_push_cell:
  836. .. rst-class:: classref-method
  837. void **push_cell** **(** **)**
  838. Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table<class_RichTextLabel_method_push_table>` for details.
  839. .. rst-class:: classref-item-separator
  840. ----
  841. .. _class_RichTextLabel_method_push_color:
  842. .. rst-class:: classref-method
  843. void **push_color** **(** :ref:`Color<class_Color>` color **)**
  844. Adds a ``[color]`` tag to the tag stack.
  845. .. rst-class:: classref-item-separator
  846. ----
  847. .. _class_RichTextLabel_method_push_dropcap:
  848. .. rst-class:: classref-method
  849. void **push_dropcap** **(** :ref:`String<class_String>` string, :ref:`Font<class_Font>` font, :ref:`int<class_int>` size, :ref:`Rect2<class_Rect2>` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`int<class_int>` outline_size=0, :ref:`Color<class_Color>` outline_color=Color(0, 0, 0, 0) **)**
  850. Adds a ``[dropcap]`` 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.
  851. .. rst-class:: classref-item-separator
  852. ----
  853. .. _class_RichTextLabel_method_push_fgcolor:
  854. .. rst-class:: classref-method
  855. void **push_fgcolor** **(** :ref:`Color<class_Color>` fgcolor **)**
  856. Adds a ``[fgcolor]`` tag to the tag stack.
  857. .. rst-class:: classref-item-separator
  858. ----
  859. .. _class_RichTextLabel_method_push_font:
  860. .. rst-class:: classref-method
  861. void **push_font** **(** :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size **)**
  862. Adds a ``[font]`` tag to the tag stack. Overrides default fonts for its duration.
  863. .. rst-class:: classref-item-separator
  864. ----
  865. .. _class_RichTextLabel_method_push_font_size:
  866. .. rst-class:: classref-method
  867. void **push_font_size** **(** :ref:`int<class_int>` font_size **)**
  868. .. container:: contribute
  869. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  870. .. rst-class:: classref-item-separator
  871. ----
  872. .. _class_RichTextLabel_method_push_hint:
  873. .. rst-class:: classref-method
  874. void **push_hint** **(** :ref:`String<class_String>` description **)**
  875. Adds a ``[hint]`` tag to the tag stack. Same as BBCode ``[hint=something]{text}[/hint]``.
  876. .. rst-class:: classref-item-separator
  877. ----
  878. .. _class_RichTextLabel_method_push_indent:
  879. .. rst-class:: classref-method
  880. void **push_indent** **(** :ref:`int<class_int>` level **)**
  881. Adds an ``[indent]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size<class_RichTextLabel_property_tab_size>` to determine new margin length.
  882. .. rst-class:: classref-item-separator
  883. ----
  884. .. _class_RichTextLabel_method_push_italics:
  885. .. rst-class:: classref-method
  886. void **push_italics** **(** **)**
  887. Adds a ``[font]`` tag with a italics font to the tag stack. This is the same as adding a ``[i]`` tag if not currently in a ``[b]`` tag.
  888. .. rst-class:: classref-item-separator
  889. ----
  890. .. _class_RichTextLabel_method_push_list:
  891. .. rst-class:: classref-method
  892. void **push_list** **(** :ref:`int<class_int>` level, :ref:`ListType<enum_RichTextLabel_ListType>` type, :ref:`bool<class_bool>` capitalize **)**
  893. Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size<class_RichTextLabel_property_tab_size>` to determine new margin length.
  894. .. rst-class:: classref-item-separator
  895. ----
  896. .. _class_RichTextLabel_method_push_meta:
  897. .. rst-class:: classref-method
  898. void **push_meta** **(** :ref:`Variant<class_Variant>` data **)**
  899. Adds a ``[meta]`` tag to the tag stack. Similar to the BBCode ``[url=something]{text}[/url]``, but supports non-:ref:`String<class_String>` metadata types.
  900. .. rst-class:: classref-item-separator
  901. ----
  902. .. _class_RichTextLabel_method_push_mono:
  903. .. rst-class:: classref-method
  904. void **push_mono** **(** **)**
  905. Adds a ``[font]`` tag with a monospace font to the tag stack.
  906. .. rst-class:: classref-item-separator
  907. ----
  908. .. _class_RichTextLabel_method_push_normal:
  909. .. rst-class:: classref-method
  910. void **push_normal** **(** **)**
  911. Adds a ``[font]`` tag with a normal font to the tag stack.
  912. .. rst-class:: classref-item-separator
  913. ----
  914. .. _class_RichTextLabel_method_push_outline_color:
  915. .. rst-class:: classref-method
  916. void **push_outline_color** **(** :ref:`Color<class_Color>` color **)**
  917. Adds a ``[outline_color]`` tag to the tag stack. Adds text outline for its duration.
  918. .. rst-class:: classref-item-separator
  919. ----
  920. .. _class_RichTextLabel_method_push_outline_size:
  921. .. rst-class:: classref-method
  922. void **push_outline_size** **(** :ref:`int<class_int>` outline_size **)**
  923. Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline size for its duration.
  924. .. rst-class:: classref-item-separator
  925. ----
  926. .. _class_RichTextLabel_method_push_paragraph:
  927. .. rst-class:: classref-method
  928. void **push_paragraph** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment, :ref:`TextDirection<enum_Control_TextDirection>` base_direction=0, :ref:`String<class_String>` language="", :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` st_parser=0 **)**
  929. Adds a ``[p]`` tag to the tag stack.
  930. .. rst-class:: classref-item-separator
  931. ----
  932. .. _class_RichTextLabel_method_push_strikethrough:
  933. .. rst-class:: classref-method
  934. void **push_strikethrough** **(** **)**
  935. Adds a ``[s]`` tag to the tag stack.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_RichTextLabel_method_push_table:
  939. .. rst-class:: classref-method
  940. void **push_table** **(** :ref:`int<class_int>` columns, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=0, :ref:`int<class_int>` align_to_row=-1 **)**
  941. Adds a ``[table=columns,inline_align]`` tag to the tag stack.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_RichTextLabel_method_push_underline:
  945. .. rst-class:: classref-method
  946. void **push_underline** **(** **)**
  947. Adds a ``[u]`` tag to the tag stack.
  948. .. rst-class:: classref-item-separator
  949. ----
  950. .. _class_RichTextLabel_method_remove_paragraph:
  951. .. rst-class:: classref-method
  952. :ref:`bool<class_bool>` **remove_paragraph** **(** :ref:`int<class_int>` paragraph **)**
  953. Removes a paragraph of content from the label. Returns ``true`` if the paragraph exists.
  954. The ``paragraph`` argument is the index of the paragraph to remove, it can take values in the interval ``[0, get_paragraph_count() - 1]``.
  955. .. rst-class:: classref-item-separator
  956. ----
  957. .. _class_RichTextLabel_method_scroll_to_line:
  958. .. rst-class:: classref-method
  959. void **scroll_to_line** **(** :ref:`int<class_int>` line **)**
  960. Scrolls the window's top line to match ``line``.
  961. .. rst-class:: classref-item-separator
  962. ----
  963. .. _class_RichTextLabel_method_scroll_to_paragraph:
  964. .. rst-class:: classref-method
  965. void **scroll_to_paragraph** **(** :ref:`int<class_int>` paragraph **)**
  966. Scrolls the window's top line to match first line of the ``paragraph``.
  967. .. rst-class:: classref-item-separator
  968. ----
  969. .. _class_RichTextLabel_method_scroll_to_selection:
  970. .. rst-class:: classref-method
  971. void **scroll_to_selection** **(** **)**
  972. Scrolls to the beginning of the current selection.
  973. .. rst-class:: classref-item-separator
  974. ----
  975. .. _class_RichTextLabel_method_select_all:
  976. .. rst-class:: classref-method
  977. void **select_all** **(** **)**
  978. Select all the text.
  979. If :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` is ``false``, no selection will occur.
  980. .. rst-class:: classref-item-separator
  981. ----
  982. .. _class_RichTextLabel_method_set_cell_border_color:
  983. .. rst-class:: classref-method
  984. void **set_cell_border_color** **(** :ref:`Color<class_Color>` color **)**
  985. Sets color of a table cell border.
  986. .. rst-class:: classref-item-separator
  987. ----
  988. .. _class_RichTextLabel_method_set_cell_padding:
  989. .. rst-class:: classref-method
  990. void **set_cell_padding** **(** :ref:`Rect2<class_Rect2>` padding **)**
  991. Sets inner padding of a table cell.
  992. .. rst-class:: classref-item-separator
  993. ----
  994. .. _class_RichTextLabel_method_set_cell_row_background_color:
  995. .. rst-class:: classref-method
  996. void **set_cell_row_background_color** **(** :ref:`Color<class_Color>` odd_row_bg, :ref:`Color<class_Color>` even_row_bg **)**
  997. Sets color of a table cell. Separate colors for alternating rows can be specified.
  998. .. rst-class:: classref-item-separator
  999. ----
  1000. .. _class_RichTextLabel_method_set_cell_size_override:
  1001. .. rst-class:: classref-method
  1002. void **set_cell_size_override** **(** :ref:`Vector2<class_Vector2>` min_size, :ref:`Vector2<class_Vector2>` max_size **)**
  1003. Sets minimum and maximum size overrides for a table cell.
  1004. .. rst-class:: classref-item-separator
  1005. ----
  1006. .. _class_RichTextLabel_method_set_table_column_expand:
  1007. .. rst-class:: classref-method
  1008. void **set_table_column_expand** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand, :ref:`int<class_int>` ratio **)**
  1009. Edits the selected column's expansion options. If ``expand`` is ``true``, the column expands in proportion to its expansion ratio versus the other columns' ratios.
  1010. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
  1011. If ``expand`` is ``false``, the column will not contribute to the total ratio.
  1012. .. rst-class:: classref-section-separator
  1013. ----
  1014. .. rst-class:: classref-descriptions-group
  1015. Theme Property Descriptions
  1016. ---------------------------
  1017. .. _class_RichTextLabel_theme_color_default_color:
  1018. .. rst-class:: classref-themeproperty
  1019. :ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)``
  1020. The default text color.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_RichTextLabel_theme_color_font_outline_color:
  1024. .. rst-class:: classref-themeproperty
  1025. :ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)``
  1026. The default tint of text outline.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_RichTextLabel_theme_color_font_selected_color:
  1030. .. rst-class:: classref-themeproperty
  1031. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)``
  1032. The color of selected text, used when :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` is ``true``. If equal to ``Color(0, 0, 0, 0)``, it will be ignored.
  1033. .. rst-class:: classref-item-separator
  1034. ----
  1035. .. _class_RichTextLabel_theme_color_font_shadow_color:
  1036. .. rst-class:: classref-themeproperty
  1037. :ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 0)``
  1038. The color of the font's shadow.
  1039. .. rst-class:: classref-item-separator
  1040. ----
  1041. .. _class_RichTextLabel_theme_color_selection_color:
  1042. .. rst-class:: classref-themeproperty
  1043. :ref:`Color<class_Color>` **selection_color** = ``Color(0.1, 0.1, 1, 0.8)``
  1044. The color of the selection box.
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_RichTextLabel_theme_color_table_border:
  1048. .. rst-class:: classref-themeproperty
  1049. :ref:`Color<class_Color>` **table_border** = ``Color(0, 0, 0, 0)``
  1050. The default cell border color.
  1051. .. rst-class:: classref-item-separator
  1052. ----
  1053. .. _class_RichTextLabel_theme_color_table_even_row_bg:
  1054. .. rst-class:: classref-themeproperty
  1055. :ref:`Color<class_Color>` **table_even_row_bg** = ``Color(0, 0, 0, 0)``
  1056. The default background color for even rows.
  1057. .. rst-class:: classref-item-separator
  1058. ----
  1059. .. _class_RichTextLabel_theme_color_table_odd_row_bg:
  1060. .. rst-class:: classref-themeproperty
  1061. :ref:`Color<class_Color>` **table_odd_row_bg** = ``Color(0, 0, 0, 0)``
  1062. The default background color for odd rows.
  1063. .. rst-class:: classref-item-separator
  1064. ----
  1065. .. _class_RichTextLabel_theme_constant_line_separation:
  1066. .. rst-class:: classref-themeproperty
  1067. :ref:`int<class_int>` **line_separation** = ``0``
  1068. The vertical space between lines.
  1069. .. rst-class:: classref-item-separator
  1070. ----
  1071. .. _class_RichTextLabel_theme_constant_outline_size:
  1072. .. rst-class:: classref-themeproperty
  1073. :ref:`int<class_int>` **outline_size** = ``0``
  1074. The size of the text outline.
  1075. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_RichTextLabel_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  1076. .. rst-class:: classref-item-separator
  1077. ----
  1078. .. _class_RichTextLabel_theme_constant_shadow_offset_x:
  1079. .. rst-class:: classref-themeproperty
  1080. :ref:`int<class_int>` **shadow_offset_x** = ``1``
  1081. The horizontal offset of the font's shadow.
  1082. .. rst-class:: classref-item-separator
  1083. ----
  1084. .. _class_RichTextLabel_theme_constant_shadow_offset_y:
  1085. .. rst-class:: classref-themeproperty
  1086. :ref:`int<class_int>` **shadow_offset_y** = ``1``
  1087. The vertical offset of the font's shadow.
  1088. .. rst-class:: classref-item-separator
  1089. ----
  1090. .. _class_RichTextLabel_theme_constant_shadow_outline_size:
  1091. .. rst-class:: classref-themeproperty
  1092. :ref:`int<class_int>` **shadow_outline_size** = ``1``
  1093. The size of the shadow outline.
  1094. .. rst-class:: classref-item-separator
  1095. ----
  1096. .. _class_RichTextLabel_theme_constant_table_h_separation:
  1097. .. rst-class:: classref-themeproperty
  1098. :ref:`int<class_int>` **table_h_separation** = ``3``
  1099. The horizontal separation of elements in a table.
  1100. .. rst-class:: classref-item-separator
  1101. ----
  1102. .. _class_RichTextLabel_theme_constant_table_v_separation:
  1103. .. rst-class:: classref-themeproperty
  1104. :ref:`int<class_int>` **table_v_separation** = ``3``
  1105. The vertical separation of elements in a table.
  1106. .. rst-class:: classref-item-separator
  1107. ----
  1108. .. _class_RichTextLabel_theme_constant_text_highlight_h_padding:
  1109. .. rst-class:: classref-themeproperty
  1110. :ref:`int<class_int>` **text_highlight_h_padding** = ``3``
  1111. The horizontal padding around a highlighting and background color box.
  1112. .. rst-class:: classref-item-separator
  1113. ----
  1114. .. _class_RichTextLabel_theme_constant_text_highlight_v_padding:
  1115. .. rst-class:: classref-themeproperty
  1116. :ref:`int<class_int>` **text_highlight_v_padding** = ``3``
  1117. The vertical padding around a highlighting and background color box.
  1118. .. rst-class:: classref-item-separator
  1119. ----
  1120. .. _class_RichTextLabel_theme_font_bold_font:
  1121. .. rst-class:: classref-themeproperty
  1122. :ref:`Font<class_Font>` **bold_font**
  1123. The font used for bold text.
  1124. .. rst-class:: classref-item-separator
  1125. ----
  1126. .. _class_RichTextLabel_theme_font_bold_italics_font:
  1127. .. rst-class:: classref-themeproperty
  1128. :ref:`Font<class_Font>` **bold_italics_font**
  1129. The font used for bold italics text.
  1130. .. rst-class:: classref-item-separator
  1131. ----
  1132. .. _class_RichTextLabel_theme_font_italics_font:
  1133. .. rst-class:: classref-themeproperty
  1134. :ref:`Font<class_Font>` **italics_font**
  1135. The font used for italics text.
  1136. .. rst-class:: classref-item-separator
  1137. ----
  1138. .. _class_RichTextLabel_theme_font_mono_font:
  1139. .. rst-class:: classref-themeproperty
  1140. :ref:`Font<class_Font>` **mono_font**
  1141. The font used for monospace text.
  1142. .. rst-class:: classref-item-separator
  1143. ----
  1144. .. _class_RichTextLabel_theme_font_normal_font:
  1145. .. rst-class:: classref-themeproperty
  1146. :ref:`Font<class_Font>` **normal_font**
  1147. The default text font.
  1148. .. rst-class:: classref-item-separator
  1149. ----
  1150. .. _class_RichTextLabel_theme_font_size_bold_font_size:
  1151. .. rst-class:: classref-themeproperty
  1152. :ref:`int<class_int>` **bold_font_size**
  1153. The font size used for bold text.
  1154. .. rst-class:: classref-item-separator
  1155. ----
  1156. .. _class_RichTextLabel_theme_font_size_bold_italics_font_size:
  1157. .. rst-class:: classref-themeproperty
  1158. :ref:`int<class_int>` **bold_italics_font_size**
  1159. The font size used for bold italics text.
  1160. .. rst-class:: classref-item-separator
  1161. ----
  1162. .. _class_RichTextLabel_theme_font_size_italics_font_size:
  1163. .. rst-class:: classref-themeproperty
  1164. :ref:`int<class_int>` **italics_font_size**
  1165. The font size used for italics text.
  1166. .. rst-class:: classref-item-separator
  1167. ----
  1168. .. _class_RichTextLabel_theme_font_size_mono_font_size:
  1169. .. rst-class:: classref-themeproperty
  1170. :ref:`int<class_int>` **mono_font_size**
  1171. The font size used for monospace text.
  1172. .. rst-class:: classref-item-separator
  1173. ----
  1174. .. _class_RichTextLabel_theme_font_size_normal_font_size:
  1175. .. rst-class:: classref-themeproperty
  1176. :ref:`int<class_int>` **normal_font_size**
  1177. The default text font size.
  1178. .. rst-class:: classref-item-separator
  1179. ----
  1180. .. _class_RichTextLabel_theme_style_focus:
  1181. .. rst-class:: classref-themeproperty
  1182. :ref:`StyleBox<class_StyleBox>` **focus**
  1183. The background used when the **RichTextLabel** is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
  1184. .. rst-class:: classref-item-separator
  1185. ----
  1186. .. _class_RichTextLabel_theme_style_normal:
  1187. .. rst-class:: classref-themeproperty
  1188. :ref:`StyleBox<class_StyleBox>` **normal**
  1189. The normal background for the **RichTextLabel**.
  1190. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1191. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1192. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1193. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1194. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1195. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`