class_richtextlabel.rst 192 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434
  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. A control for displaying text that can contain different font styles, images, and basic formatting.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A control for displaying text that can contain custom fonts, images, and basic formatting. **RichTextLabel** manages these as an internal tag stack. It also adapts itself to given width/heights.
  15. \ **Note:** :ref:`newline<class_RichTextLabel_method_newline>`, :ref:`push_paragraph<class_RichTextLabel_method_push_paragraph>`, ``"\n"``, ``"\r\n"``, ``p`` tag, and alignment tags start a new paragraph. Each paragraph is processed independently, in its own BiDi context. If you want to force line wrapping within paragraph, any other line breaking character can be used, for example, Form Feed (U+000C), Next Line (U+0085), Line Separator (U+2028).
  16. \ **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.
  17. \ **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]``.
  18. \ **Note:** ``push_*/pop_*`` functions won't affect BBCode.
  19. \ **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<class_RichTextLabel_property_fit_content>` property.
  20. .. rst-class:: classref-introduction-group
  21. Tutorials
  22. ---------
  23. - :doc:`BBCode in RichTextLabel <../tutorials/ui/bbcode_in_richtextlabel>`
  24. - `Rich Text Label with BBCode Demo <https://godotengine.org/asset-library/asset/2774>`__
  25. - `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__
  26. .. rst-class:: classref-reftable-group
  27. Properties
  28. ----------
  29. .. table::
  30. :widths: auto
  31. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  32. | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`autowrap_mode<class_RichTextLabel_property_autowrap_mode>` | ``3`` |
  33. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` | ``false`` |
  35. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
  37. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_RichTextLabel_property_context_menu_enabled>` | ``false`` |
  39. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  40. | :ref:`Array<class_Array>` | :ref:`custom_effects<class_RichTextLabel_property_custom_effects>` | ``[]`` |
  41. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_RichTextLabel_property_deselect_on_focus_loss_enabled>` | ``true`` |
  43. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`drag_and_drop_selection_enabled<class_RichTextLabel_property_drag_and_drop_selection_enabled>` | ``true`` |
  45. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`fit_content<class_RichTextLabel_property_fit_content>` | ``false`` |
  47. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`hint_underlined<class_RichTextLabel_property_hint_underlined>` | ``true`` |
  49. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  50. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_RichTextLabel_property_horizontal_alignment>` | ``0`` |
  51. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  52. | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_RichTextLabel_property_justification_flags>` | ``163`` |
  53. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  54. | :ref:`String<class_String>` | :ref:`language<class_RichTextLabel_property_language>` | ``""`` |
  55. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` | ``true`` |
  57. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`progress_bar_delay<class_RichTextLabel_property_progress_bar_delay>` | ``1000`` |
  59. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`scroll_active<class_RichTextLabel_property_scroll_active>` | ``true`` |
  61. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`scroll_following<class_RichTextLabel_property_scroll_following>` | ``false`` |
  63. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` | ``false`` |
  65. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  66. | :ref:`bool<class_bool>` | :ref:`shortcut_keys_enabled<class_RichTextLabel_property_shortcut_keys_enabled>` | ``true`` |
  67. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  68. | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_RichTextLabel_property_structured_text_bidi_override>` | ``0`` |
  69. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  70. | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_RichTextLabel_property_structured_text_bidi_override_options>` | ``[]`` |
  71. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`tab_size<class_RichTextLabel_property_tab_size>` | ``4`` |
  73. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  74. | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`tab_stops<class_RichTextLabel_property_tab_stops>` | ``PackedFloat32Array()`` |
  75. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  76. | :ref:`String<class_String>` | :ref:`text<class_RichTextLabel_property_text>` | ``""`` |
  77. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  78. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_RichTextLabel_property_text_direction>` | ``0`` |
  79. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  80. | :ref:`bool<class_bool>` | :ref:`threaded<class_RichTextLabel_property_threaded>` | ``false`` |
  81. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  82. | :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` | :ref:`vertical_alignment<class_RichTextLabel_property_vertical_alignment>` | ``0`` |
  83. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  84. | :ref:`int<class_int>` | :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` | ``-1`` |
  85. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  86. | :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` | :ref:`visible_characters_behavior<class_RichTextLabel_property_visible_characters_behavior>` | ``0`` |
  87. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  88. | :ref:`float<class_float>` | :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` | ``1.0`` |
  89. +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  90. .. rst-class:: classref-reftable-group
  91. Methods
  92. -------
  93. .. table::
  94. :widths: auto
  95. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`add_image<class_RichTextLabel_method_add_image>`\ (\ image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), key\: :ref:`Variant<class_Variant>` = null, pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) |
  97. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | |void| | :ref:`add_text<class_RichTextLabel_method_add_text>`\ (\ text\: :ref:`String<class_String>`\ ) |
  99. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | |void| | :ref:`append_text<class_RichTextLabel_method_append_text>`\ (\ bbcode\: :ref:`String<class_String>`\ ) |
  101. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | |void| | :ref:`clear<class_RichTextLabel_method_clear>`\ (\ ) |
  103. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | |void| | :ref:`deselect<class_RichTextLabel_method_deselect>`\ (\ ) |
  105. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`int<class_int>` | :ref:`get_character_line<class_RichTextLabel_method_get_character_line>`\ (\ character\: :ref:`int<class_int>`\ ) |
  107. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`get_character_paragraph<class_RichTextLabel_method_get_character_paragraph>`\ (\ character\: :ref:`int<class_int>`\ ) |
  109. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`get_content_height<class_RichTextLabel_method_get_content_height>`\ (\ ) |const| |
  111. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`get_content_width<class_RichTextLabel_method_get_content_width>`\ (\ ) |const| |
  113. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`int<class_int>` | :ref:`get_line_count<class_RichTextLabel_method_get_line_count>`\ (\ ) |const| |
  115. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`float<class_float>` | :ref:`get_line_offset<class_RichTextLabel_method_get_line_offset>`\ (\ line\: :ref:`int<class_int>`\ ) |
  117. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`Vector2i<class_Vector2i>` | :ref:`get_line_range<class_RichTextLabel_method_get_line_range>`\ (\ line\: :ref:`int<class_int>`\ ) |
  119. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_RichTextLabel_method_get_menu>`\ (\ ) |const| |
  121. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`int<class_int>` | :ref:`get_paragraph_count<class_RichTextLabel_method_get_paragraph_count>`\ (\ ) |const| |
  123. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`float<class_float>` | :ref:`get_paragraph_offset<class_RichTextLabel_method_get_paragraph_offset>`\ (\ paragraph\: :ref:`int<class_int>`\ ) |
  125. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`String<class_String>` | :ref:`get_parsed_text<class_RichTextLabel_method_get_parsed_text>`\ (\ ) |const| |
  127. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`String<class_String>` | :ref:`get_selected_text<class_RichTextLabel_method_get_selected_text>`\ (\ ) |const| |
  129. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`get_selection_from<class_RichTextLabel_method_get_selection_from>`\ (\ ) |const| |
  131. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`int<class_int>` | :ref:`get_selection_to<class_RichTextLabel_method_get_selection_to>`\ (\ ) |const| |
  133. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`int<class_int>` | :ref:`get_total_character_count<class_RichTextLabel_method_get_total_character_count>`\ (\ ) |const| |
  135. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_RichTextLabel_method_get_v_scroll_bar>`\ (\ ) |
  137. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_RichTextLabel_method_get_visible_line_count>`\ (\ ) |const| |
  139. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`int<class_int>` | :ref:`get_visible_paragraph_count<class_RichTextLabel_method_get_visible_paragraph_count>`\ (\ ) |const| |
  141. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | |void| | :ref:`install_effect<class_RichTextLabel_method_install_effect>`\ (\ effect\: :ref:`Variant<class_Variant>`\ ) |
  143. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`bool<class_bool>` | :ref:`invalidate_paragraph<class_RichTextLabel_method_invalidate_paragraph>`\ (\ paragraph\: :ref:`int<class_int>`\ ) |
  145. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`bool<class_bool>` | :ref:`is_finished<class_RichTextLabel_method_is_finished>`\ (\ ) |const| |
  147. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_RichTextLabel_method_is_menu_visible>`\ (\ ) |const| |
  149. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`bool<class_bool>` | :ref:`is_ready<class_RichTextLabel_method_is_ready>`\ (\ ) |const| |
  151. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | |void| | :ref:`menu_option<class_RichTextLabel_method_menu_option>`\ (\ option\: :ref:`int<class_int>`\ ) |
  153. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | |void| | :ref:`newline<class_RichTextLabel_method_newline>`\ (\ ) |
  155. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | |void| | :ref:`parse_bbcode<class_RichTextLabel_method_parse_bbcode>`\ (\ bbcode\: :ref:`String<class_String>`\ ) |
  157. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | :ref:`Dictionary<class_Dictionary>` | :ref:`parse_expressions_for_values<class_RichTextLabel_method_parse_expressions_for_values>`\ (\ expressions\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |
  159. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | |void| | :ref:`pop<class_RichTextLabel_method_pop>`\ (\ ) |
  161. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | |void| | :ref:`pop_all<class_RichTextLabel_method_pop_all>`\ (\ ) |
  163. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | |void| | :ref:`pop_context<class_RichTextLabel_method_pop_context>`\ (\ ) |
  165. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | |void| | :ref:`push_bgcolor<class_RichTextLabel_method_push_bgcolor>`\ (\ bgcolor\: :ref:`Color<class_Color>`\ ) |
  167. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | |void| | :ref:`push_bold<class_RichTextLabel_method_push_bold>`\ (\ ) |
  169. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | |void| | :ref:`push_bold_italics<class_RichTextLabel_method_push_bold_italics>`\ (\ ) |
  171. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | |void| | :ref:`push_cell<class_RichTextLabel_method_push_cell>`\ (\ ) |
  173. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | |void| | :ref:`push_color<class_RichTextLabel_method_push_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) |
  175. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | |void| | :ref:`push_context<class_RichTextLabel_method_push_context>`\ (\ ) |
  177. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | |void| | :ref:`push_customfx<class_RichTextLabel_method_push_customfx>`\ (\ effect\: :ref:`RichTextEffect<class_RichTextEffect>`, env\: :ref:`Dictionary<class_Dictionary>`\ ) |
  179. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | |void| | :ref:`push_dropcap<class_RichTextLabel_method_push_dropcap>`\ (\ string\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, size\: :ref:`int<class_int>`, dropcap_margins\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), outline_size\: :ref:`int<class_int>` = 0, outline_color\: :ref:`Color<class_Color>` = Color(0, 0, 0, 0)\ ) |
  181. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | |void| | :ref:`push_fgcolor<class_RichTextLabel_method_push_fgcolor>`\ (\ fgcolor\: :ref:`Color<class_Color>`\ ) |
  183. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | |void| | :ref:`push_font<class_RichTextLabel_method_push_font>`\ (\ font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>` = 0\ ) |
  185. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | |void| | :ref:`push_font_size<class_RichTextLabel_method_push_font_size>`\ (\ font_size\: :ref:`int<class_int>`\ ) |
  187. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | |void| | :ref:`push_hint<class_RichTextLabel_method_push_hint>`\ (\ description\: :ref:`String<class_String>`\ ) |
  189. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | |void| | :ref:`push_indent<class_RichTextLabel_method_push_indent>`\ (\ level\: :ref:`int<class_int>`\ ) |
  191. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | |void| | :ref:`push_italics<class_RichTextLabel_method_push_italics>`\ (\ ) |
  193. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | |void| | :ref:`push_language<class_RichTextLabel_method_push_language>`\ (\ language\: :ref:`String<class_String>`\ ) |
  195. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | |void| | :ref:`push_list<class_RichTextLabel_method_push_list>`\ (\ level\: :ref:`int<class_int>`, type\: :ref:`ListType<enum_RichTextLabel_ListType>`, capitalize\: :ref:`bool<class_bool>`, bullet\: :ref:`String<class_String>` = "•"\ ) |
  197. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | |void| | :ref:`push_meta<class_RichTextLabel_method_push_meta>`\ (\ data\: :ref:`Variant<class_Variant>`, underline_mode\: :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` = 1, tooltip\: :ref:`String<class_String>` = ""\ ) |
  199. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | |void| | :ref:`push_mono<class_RichTextLabel_method_push_mono>`\ (\ ) |
  201. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | |void| | :ref:`push_normal<class_RichTextLabel_method_push_normal>`\ (\ ) |
  203. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. | |void| | :ref:`push_outline_color<class_RichTextLabel_method_push_outline_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) |
  205. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  206. | |void| | :ref:`push_outline_size<class_RichTextLabel_method_push_outline_size>`\ (\ outline_size\: :ref:`int<class_int>`\ ) |
  207. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  208. | |void| | :ref:`push_paragraph<class_RichTextLabel_method_push_paragraph>`\ (\ alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`, base_direction\: :ref:`TextDirection<enum_Control_TextDirection>` = 0, language\: :ref:`String<class_String>` = "", st_parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` = 0, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 163, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array()\ ) |
  209. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  210. | |void| | :ref:`push_strikethrough<class_RichTextLabel_method_push_strikethrough>`\ (\ ) |
  211. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  212. | |void| | :ref:`push_table<class_RichTextLabel_method_push_table>`\ (\ columns\: :ref:`int<class_int>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 0, align_to_row\: :ref:`int<class_int>` = -1\ ) |
  213. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  214. | |void| | :ref:`push_underline<class_RichTextLabel_method_push_underline>`\ (\ ) |
  215. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  216. | :ref:`bool<class_bool>` | :ref:`remove_paragraph<class_RichTextLabel_method_remove_paragraph>`\ (\ paragraph\: :ref:`int<class_int>`, no_invalidate\: :ref:`bool<class_bool>` = false\ ) |
  217. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  218. | |void| | :ref:`scroll_to_line<class_RichTextLabel_method_scroll_to_line>`\ (\ line\: :ref:`int<class_int>`\ ) |
  219. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  220. | |void| | :ref:`scroll_to_paragraph<class_RichTextLabel_method_scroll_to_paragraph>`\ (\ paragraph\: :ref:`int<class_int>`\ ) |
  221. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  222. | |void| | :ref:`scroll_to_selection<class_RichTextLabel_method_scroll_to_selection>`\ (\ ) |
  223. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  224. | |void| | :ref:`select_all<class_RichTextLabel_method_select_all>`\ (\ ) |
  225. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  226. | |void| | :ref:`set_cell_border_color<class_RichTextLabel_method_set_cell_border_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) |
  227. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  228. | |void| | :ref:`set_cell_padding<class_RichTextLabel_method_set_cell_padding>`\ (\ padding\: :ref:`Rect2<class_Rect2>`\ ) |
  229. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  230. | |void| | :ref:`set_cell_row_background_color<class_RichTextLabel_method_set_cell_row_background_color>`\ (\ odd_row_bg\: :ref:`Color<class_Color>`, even_row_bg\: :ref:`Color<class_Color>`\ ) |
  231. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  232. | |void| | :ref:`set_cell_size_override<class_RichTextLabel_method_set_cell_size_override>`\ (\ min_size\: :ref:`Vector2<class_Vector2>`, max_size\: :ref:`Vector2<class_Vector2>`\ ) |
  233. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  234. | |void| | :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>`\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`, ratio\: :ref:`int<class_int>` = 1\ ) |
  235. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  236. | |void| | :ref:`update_image<class_RichTextLabel_method_update_image>`\ (\ key\: :ref:`Variant<class_Variant>`, mask\: |bitfield|\[:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>`\], image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) |
  237. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  238. .. rst-class:: classref-reftable-group
  239. Theme Properties
  240. ----------------
  241. .. table::
  242. :widths: auto
  243. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  244. | :ref:`Color<class_Color>` | :ref:`default_color<class_RichTextLabel_theme_color_default_color>` | ``Color(1, 1, 1, 1)`` |
  245. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  246. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_RichTextLabel_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  247. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  248. | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_RichTextLabel_theme_color_font_selected_color>` | ``Color(0, 0, 0, 0)`` |
  249. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  250. | :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_RichTextLabel_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 0)`` |
  251. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  252. | :ref:`Color<class_Color>` | :ref:`selection_color<class_RichTextLabel_theme_color_selection_color>` | ``Color(0.1, 0.1, 1, 0.8)`` |
  253. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  254. | :ref:`Color<class_Color>` | :ref:`table_border<class_RichTextLabel_theme_color_table_border>` | ``Color(0, 0, 0, 0)`` |
  255. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  256. | :ref:`Color<class_Color>` | :ref:`table_even_row_bg<class_RichTextLabel_theme_color_table_even_row_bg>` | ``Color(0, 0, 0, 0)`` |
  257. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  258. | :ref:`Color<class_Color>` | :ref:`table_odd_row_bg<class_RichTextLabel_theme_color_table_odd_row_bg>` | ``Color(0, 0, 0, 0)`` |
  259. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  260. | :ref:`int<class_int>` | :ref:`line_separation<class_RichTextLabel_theme_constant_line_separation>` | ``0`` |
  261. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  262. | :ref:`int<class_int>` | :ref:`outline_size<class_RichTextLabel_theme_constant_outline_size>` | ``0`` |
  263. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  264. | :ref:`int<class_int>` | :ref:`shadow_offset_x<class_RichTextLabel_theme_constant_shadow_offset_x>` | ``1`` |
  265. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  266. | :ref:`int<class_int>` | :ref:`shadow_offset_y<class_RichTextLabel_theme_constant_shadow_offset_y>` | ``1`` |
  267. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  268. | :ref:`int<class_int>` | :ref:`shadow_outline_size<class_RichTextLabel_theme_constant_shadow_outline_size>` | ``1`` |
  269. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  270. | :ref:`int<class_int>` | :ref:`table_h_separation<class_RichTextLabel_theme_constant_table_h_separation>` | ``3`` |
  271. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  272. | :ref:`int<class_int>` | :ref:`table_v_separation<class_RichTextLabel_theme_constant_table_v_separation>` | ``3`` |
  273. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  274. | :ref:`int<class_int>` | :ref:`text_highlight_h_padding<class_RichTextLabel_theme_constant_text_highlight_h_padding>` | ``3`` |
  275. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  276. | :ref:`int<class_int>` | :ref:`text_highlight_v_padding<class_RichTextLabel_theme_constant_text_highlight_v_padding>` | ``3`` |
  277. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  278. | :ref:`Font<class_Font>` | :ref:`bold_font<class_RichTextLabel_theme_font_bold_font>` | |
  279. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  280. | :ref:`Font<class_Font>` | :ref:`bold_italics_font<class_RichTextLabel_theme_font_bold_italics_font>` | |
  281. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  282. | :ref:`Font<class_Font>` | :ref:`italics_font<class_RichTextLabel_theme_font_italics_font>` | |
  283. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  284. | :ref:`Font<class_Font>` | :ref:`mono_font<class_RichTextLabel_theme_font_mono_font>` | |
  285. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  286. | :ref:`Font<class_Font>` | :ref:`normal_font<class_RichTextLabel_theme_font_normal_font>` | |
  287. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  288. | :ref:`int<class_int>` | :ref:`bold_font_size<class_RichTextLabel_theme_font_size_bold_font_size>` | |
  289. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  290. | :ref:`int<class_int>` | :ref:`bold_italics_font_size<class_RichTextLabel_theme_font_size_bold_italics_font_size>` | |
  291. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  292. | :ref:`int<class_int>` | :ref:`italics_font_size<class_RichTextLabel_theme_font_size_italics_font_size>` | |
  293. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  294. | :ref:`int<class_int>` | :ref:`mono_font_size<class_RichTextLabel_theme_font_size_mono_font_size>` | |
  295. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  296. | :ref:`int<class_int>` | :ref:`normal_font_size<class_RichTextLabel_theme_font_size_normal_font_size>` | |
  297. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  298. | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_RichTextLabel_theme_style_focus>` | |
  299. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  300. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_RichTextLabel_theme_style_normal>` | |
  301. +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+
  302. .. rst-class:: classref-section-separator
  303. ----
  304. .. rst-class:: classref-descriptions-group
  305. Signals
  306. -------
  307. .. _class_RichTextLabel_signal_finished:
  308. .. rst-class:: classref-signal
  309. **finished**\ (\ ) :ref:`🔗<class_RichTextLabel_signal_finished>`
  310. Triggered when the document is fully loaded.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_RichTextLabel_signal_meta_clicked:
  314. .. rst-class:: classref-signal
  315. **meta_clicked**\ (\ meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_signal_meta_clicked>`
  316. Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. ``[url={"key": "value"}]Text[/url]``, then the parameter for this signal will always 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. Alternatively, you can convert the :ref:`String<class_String>` input to the desired type based on its contents (such as calling :ref:`JSON.parse<class_JSON_method_parse>` on it).
  317. For example, the following method can be connected to :ref:`meta_clicked<class_RichTextLabel_signal_meta_clicked>` to open clicked URLs using the user's default web browser:
  318. .. tabs::
  319. .. code-tab:: gdscript
  320. # This assumes RichTextLabel's `meta_clicked` signal was connected to
  321. # the function below using the signal connection dialog.
  322. func _richtextlabel_on_meta_clicked(meta):
  323. # `meta` is of Variant type, so convert it to a String to avoid script errors at run-time.
  324. OS.shell_open(str(meta))
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_RichTextLabel_signal_meta_hover_ended:
  328. .. rst-class:: classref-signal
  329. **meta_hover_ended**\ (\ meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_signal_meta_hover_ended>`
  330. Triggers when the mouse exits a meta tag.
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_RichTextLabel_signal_meta_hover_started:
  334. .. rst-class:: classref-signal
  335. **meta_hover_started**\ (\ meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_signal_meta_hover_started>`
  336. Triggers when the mouse enters a meta tag.
  337. .. rst-class:: classref-section-separator
  338. ----
  339. .. rst-class:: classref-descriptions-group
  340. Enumerations
  341. ------------
  342. .. _enum_RichTextLabel_ListType:
  343. .. rst-class:: classref-enumeration
  344. enum **ListType**: :ref:`🔗<enum_RichTextLabel_ListType>`
  345. .. _class_RichTextLabel_constant_LIST_NUMBERS:
  346. .. rst-class:: classref-enumeration-constant
  347. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_NUMBERS** = ``0``
  348. Each list item has a number marker.
  349. .. _class_RichTextLabel_constant_LIST_LETTERS:
  350. .. rst-class:: classref-enumeration-constant
  351. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_LETTERS** = ``1``
  352. Each list item has a letter marker.
  353. .. _class_RichTextLabel_constant_LIST_ROMAN:
  354. .. rst-class:: classref-enumeration-constant
  355. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_ROMAN** = ``2``
  356. Each list item has a roman number marker.
  357. .. _class_RichTextLabel_constant_LIST_DOTS:
  358. .. rst-class:: classref-enumeration-constant
  359. :ref:`ListType<enum_RichTextLabel_ListType>` **LIST_DOTS** = ``3``
  360. Each list item has a filled circle marker.
  361. .. rst-class:: classref-item-separator
  362. ----
  363. .. _enum_RichTextLabel_MenuItems:
  364. .. rst-class:: classref-enumeration
  365. enum **MenuItems**: :ref:`🔗<enum_RichTextLabel_MenuItems>`
  366. .. _class_RichTextLabel_constant_MENU_COPY:
  367. .. rst-class:: classref-enumeration-constant
  368. :ref:`MenuItems<enum_RichTextLabel_MenuItems>` **MENU_COPY** = ``0``
  369. Copies the selected text.
  370. .. _class_RichTextLabel_constant_MENU_SELECT_ALL:
  371. .. rst-class:: classref-enumeration-constant
  372. :ref:`MenuItems<enum_RichTextLabel_MenuItems>` **MENU_SELECT_ALL** = ``1``
  373. Selects the whole **RichTextLabel** text.
  374. .. _class_RichTextLabel_constant_MENU_MAX:
  375. .. rst-class:: classref-enumeration-constant
  376. :ref:`MenuItems<enum_RichTextLabel_MenuItems>` **MENU_MAX** = ``2``
  377. Represents the size of the :ref:`MenuItems<enum_RichTextLabel_MenuItems>` enum.
  378. .. rst-class:: classref-item-separator
  379. ----
  380. .. _enum_RichTextLabel_MetaUnderline:
  381. .. rst-class:: classref-enumeration
  382. enum **MetaUnderline**: :ref:`🔗<enum_RichTextLabel_MetaUnderline>`
  383. .. _class_RichTextLabel_constant_META_UNDERLINE_NEVER:
  384. .. rst-class:: classref-enumeration-constant
  385. :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` **META_UNDERLINE_NEVER** = ``0``
  386. Meta tag does not display an underline, even if :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``.
  387. .. _class_RichTextLabel_constant_META_UNDERLINE_ALWAYS:
  388. .. rst-class:: classref-enumeration-constant
  389. :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` **META_UNDERLINE_ALWAYS** = ``1``
  390. If :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``, meta tag always display an underline.
  391. .. _class_RichTextLabel_constant_META_UNDERLINE_ON_HOVER:
  392. .. rst-class:: classref-enumeration-constant
  393. :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` **META_UNDERLINE_ON_HOVER** = ``2``
  394. If :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``, meta tag display an underline when the mouse cursor is over it.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _enum_RichTextLabel_ImageUpdateMask:
  398. .. rst-class:: classref-enumeration
  399. flags **ImageUpdateMask**: :ref:`🔗<enum_RichTextLabel_ImageUpdateMask>`
  400. .. _class_RichTextLabel_constant_UPDATE_TEXTURE:
  401. .. rst-class:: classref-enumeration-constant
  402. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_TEXTURE** = ``1``
  403. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image texture.
  404. .. _class_RichTextLabel_constant_UPDATE_SIZE:
  405. .. rst-class:: classref-enumeration-constant
  406. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_SIZE** = ``2``
  407. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image size.
  408. .. _class_RichTextLabel_constant_UPDATE_COLOR:
  409. .. rst-class:: classref-enumeration-constant
  410. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_COLOR** = ``4``
  411. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image color.
  412. .. _class_RichTextLabel_constant_UPDATE_ALIGNMENT:
  413. .. rst-class:: classref-enumeration-constant
  414. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_ALIGNMENT** = ``8``
  415. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image inline alignment.
  416. .. _class_RichTextLabel_constant_UPDATE_REGION:
  417. .. rst-class:: classref-enumeration-constant
  418. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_REGION** = ``16``
  419. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image texture region.
  420. .. _class_RichTextLabel_constant_UPDATE_PAD:
  421. .. rst-class:: classref-enumeration-constant
  422. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_PAD** = ``32``
  423. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image padding.
  424. .. _class_RichTextLabel_constant_UPDATE_TOOLTIP:
  425. .. rst-class:: classref-enumeration-constant
  426. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_TOOLTIP** = ``64``
  427. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image tooltip.
  428. .. _class_RichTextLabel_constant_UPDATE_WIDTH_IN_PERCENT:
  429. .. rst-class:: classref-enumeration-constant
  430. :ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_WIDTH_IN_PERCENT** = ``128``
  431. If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image width from/to percents.
  432. .. rst-class:: classref-section-separator
  433. ----
  434. .. rst-class:: classref-descriptions-group
  435. Property Descriptions
  436. ---------------------
  437. .. _class_RichTextLabel_property_autowrap_mode:
  438. .. rst-class:: classref-property
  439. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3`` :ref:`🔗<class_RichTextLabel_property_autowrap_mode>`
  440. .. rst-class:: classref-property-setget
  441. - |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ )
  442. - :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ )
  443. 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>`.
  444. .. rst-class:: classref-item-separator
  445. ----
  446. .. _class_RichTextLabel_property_bbcode_enabled:
  447. .. rst-class:: classref-property
  448. :ref:`bool<class_bool>` **bbcode_enabled** = ``false`` :ref:`🔗<class_RichTextLabel_property_bbcode_enabled>`
  449. .. rst-class:: classref-property-setget
  450. - |void| **set_use_bbcode**\ (\ value\: :ref:`bool<class_bool>`\ )
  451. - :ref:`bool<class_bool>` **is_using_bbcode**\ (\ )
  452. If ``true``, the label uses BBCode formatting.
  453. \ **Note:** This only affects the contents of :ref:`text<class_RichTextLabel_property_text>`, not the tag stack.
  454. .. rst-class:: classref-item-separator
  455. ----
  456. .. _class_RichTextLabel_property_context_menu_enabled:
  457. .. rst-class:: classref-property
  458. :ref:`bool<class_bool>` **context_menu_enabled** = ``false`` :ref:`🔗<class_RichTextLabel_property_context_menu_enabled>`
  459. .. rst-class:: classref-property-setget
  460. - |void| **set_context_menu_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  461. - :ref:`bool<class_bool>` **is_context_menu_enabled**\ (\ )
  462. If ``true``, a right-click displays the context menu.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_RichTextLabel_property_custom_effects:
  466. .. rst-class:: classref-property
  467. :ref:`Array<class_Array>` **custom_effects** = ``[]`` :ref:`🔗<class_RichTextLabel_property_custom_effects>`
  468. .. rst-class:: classref-property-setget
  469. - |void| **set_effects**\ (\ value\: :ref:`Array<class_Array>`\ )
  470. - :ref:`Array<class_Array>` **get_effects**\ (\ )
  471. The currently installed custom effects. This is an array of :ref:`RichTextEffect<class_RichTextEffect>`\ s.
  472. To add a custom effect, it's more convenient to use :ref:`install_effect<class_RichTextLabel_method_install_effect>`.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _class_RichTextLabel_property_deselect_on_focus_loss_enabled:
  476. .. rst-class:: classref-property
  477. :ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` :ref:`🔗<class_RichTextLabel_property_deselect_on_focus_loss_enabled>`
  478. .. rst-class:: classref-property-setget
  479. - |void| **set_deselect_on_focus_loss_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  480. - :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled**\ (\ )
  481. If ``true``, the selected text will be deselected when focus is lost.
  482. .. rst-class:: classref-item-separator
  483. ----
  484. .. _class_RichTextLabel_property_drag_and_drop_selection_enabled:
  485. .. rst-class:: classref-property
  486. :ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true`` :ref:`🔗<class_RichTextLabel_property_drag_and_drop_selection_enabled>`
  487. .. rst-class:: classref-property-setget
  488. - |void| **set_drag_and_drop_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  489. - :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled**\ (\ )
  490. If ``true``, allow drag and drop of selected text.
  491. .. rst-class:: classref-item-separator
  492. ----
  493. .. _class_RichTextLabel_property_fit_content:
  494. .. rst-class:: classref-property
  495. :ref:`bool<class_bool>` **fit_content** = ``false`` :ref:`🔗<class_RichTextLabel_property_fit_content>`
  496. .. rst-class:: classref-property-setget
  497. - |void| **set_fit_content**\ (\ value\: :ref:`bool<class_bool>`\ )
  498. - :ref:`bool<class_bool>` **is_fit_content_enabled**\ (\ )
  499. If ``true``, the label's minimum size will be automatically updated to fit its content, matching the behavior of :ref:`Label<class_Label>`.
  500. .. rst-class:: classref-item-separator
  501. ----
  502. .. _class_RichTextLabel_property_hint_underlined:
  503. .. rst-class:: classref-property
  504. :ref:`bool<class_bool>` **hint_underlined** = ``true`` :ref:`🔗<class_RichTextLabel_property_hint_underlined>`
  505. .. rst-class:: classref-property-setget
  506. - |void| **set_hint_underline**\ (\ value\: :ref:`bool<class_bool>`\ )
  507. - :ref:`bool<class_bool>` **is_hint_underlined**\ (\ )
  508. If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/hint]``.
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _class_RichTextLabel_property_horizontal_alignment:
  512. .. rst-class:: classref-property
  513. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``0`` :ref:`🔗<class_RichTextLabel_property_horizontal_alignment>`
  514. .. rst-class:: classref-property-setget
  515. - |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ )
  516. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ )
  517. Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants.
  518. .. rst-class:: classref-item-separator
  519. ----
  520. .. _class_RichTextLabel_property_justification_flags:
  521. .. rst-class:: classref-property
  522. |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_RichTextLabel_property_justification_flags>`
  523. .. rst-class:: classref-property-setget
  524. - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ )
  525. - |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ )
  526. Line fill alignment rules. See :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` for more information.
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_RichTextLabel_property_language:
  530. .. rst-class:: classref-property
  531. :ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_RichTextLabel_property_language>`
  532. .. rst-class:: classref-property-setget
  533. - |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ )
  534. - :ref:`String<class_String>` **get_language**\ (\ )
  535. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_RichTextLabel_property_meta_underlined:
  539. .. rst-class:: classref-property
  540. :ref:`bool<class_bool>` **meta_underlined** = ``true`` :ref:`🔗<class_RichTextLabel_property_meta_underlined>`
  541. .. rst-class:: classref-property-setget
  542. - |void| **set_meta_underline**\ (\ value\: :ref:`bool<class_bool>`\ )
  543. - :ref:`bool<class_bool>` **is_meta_underlined**\ (\ )
  544. If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``. These tags can call a function when clicked if :ref:`meta_clicked<class_RichTextLabel_signal_meta_clicked>` is connected to a function.
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_RichTextLabel_property_progress_bar_delay:
  548. .. rst-class:: classref-property
  549. :ref:`int<class_int>` **progress_bar_delay** = ``1000`` :ref:`🔗<class_RichTextLabel_property_progress_bar_delay>`
  550. .. rst-class:: classref-property-setget
  551. - |void| **set_progress_bar_delay**\ (\ value\: :ref:`int<class_int>`\ )
  552. - :ref:`int<class_int>` **get_progress_bar_delay**\ (\ )
  553. The delay after which the loading progress bar is displayed, in milliseconds. Set to ``-1`` to disable progress bar entirely.
  554. \ **Note:** Progress bar is displayed only if :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled.
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _class_RichTextLabel_property_scroll_active:
  558. .. rst-class:: classref-property
  559. :ref:`bool<class_bool>` **scroll_active** = ``true`` :ref:`🔗<class_RichTextLabel_property_scroll_active>`
  560. .. rst-class:: classref-property-setget
  561. - |void| **set_scroll_active**\ (\ value\: :ref:`bool<class_bool>`\ )
  562. - :ref:`bool<class_bool>` **is_scroll_active**\ (\ )
  563. 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>`.
  564. .. rst-class:: classref-item-separator
  565. ----
  566. .. _class_RichTextLabel_property_scroll_following:
  567. .. rst-class:: classref-property
  568. :ref:`bool<class_bool>` **scroll_following** = ``false`` :ref:`🔗<class_RichTextLabel_property_scroll_following>`
  569. .. rst-class:: classref-property-setget
  570. - |void| **set_scroll_follow**\ (\ value\: :ref:`bool<class_bool>`\ )
  571. - :ref:`bool<class_bool>` **is_scroll_following**\ (\ )
  572. If ``true``, the window scrolls down to display new content automatically.
  573. .. rst-class:: classref-item-separator
  574. ----
  575. .. _class_RichTextLabel_property_selection_enabled:
  576. .. rst-class:: classref-property
  577. :ref:`bool<class_bool>` **selection_enabled** = ``false`` :ref:`🔗<class_RichTextLabel_property_selection_enabled>`
  578. .. rst-class:: classref-property-setget
  579. - |void| **set_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  580. - :ref:`bool<class_bool>` **is_selection_enabled**\ (\ )
  581. If ``true``, the label allows text selection.
  582. .. rst-class:: classref-item-separator
  583. ----
  584. .. _class_RichTextLabel_property_shortcut_keys_enabled:
  585. .. rst-class:: classref-property
  586. :ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` :ref:`🔗<class_RichTextLabel_property_shortcut_keys_enabled>`
  587. .. rst-class:: classref-property-setget
  588. - |void| **set_shortcut_keys_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  589. - :ref:`bool<class_bool>` **is_shortcut_keys_enabled**\ (\ )
  590. If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled.
  591. .. rst-class:: classref-item-separator
  592. ----
  593. .. _class_RichTextLabel_property_structured_text_bidi_override:
  594. .. rst-class:: classref-property
  595. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_RichTextLabel_property_structured_text_bidi_override>`
  596. .. rst-class:: classref-property-setget
  597. - |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ )
  598. - :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ )
  599. Set BiDi algorithm override for the structured text.
  600. .. rst-class:: classref-item-separator
  601. ----
  602. .. _class_RichTextLabel_property_structured_text_bidi_override_options:
  603. .. rst-class:: classref-property
  604. :ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_RichTextLabel_property_structured_text_bidi_override_options>`
  605. .. rst-class:: classref-property-setget
  606. - |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ )
  607. - :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ )
  608. Set additional options for BiDi override.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _class_RichTextLabel_property_tab_size:
  612. .. rst-class:: classref-property
  613. :ref:`int<class_int>` **tab_size** = ``4`` :ref:`🔗<class_RichTextLabel_property_tab_size>`
  614. .. rst-class:: classref-property-setget
  615. - |void| **set_tab_size**\ (\ value\: :ref:`int<class_int>`\ )
  616. - :ref:`int<class_int>` **get_tab_size**\ (\ )
  617. The number of spaces associated with a single tab length. Does not affect ``\t`` in text tags, only indent tags.
  618. .. rst-class:: classref-item-separator
  619. ----
  620. .. _class_RichTextLabel_property_tab_stops:
  621. .. rst-class:: classref-property
  622. :ref:`PackedFloat32Array<class_PackedFloat32Array>` **tab_stops** = ``PackedFloat32Array()`` :ref:`🔗<class_RichTextLabel_property_tab_stops>`
  623. .. rst-class:: classref-property-setget
  624. - |void| **set_tab_stops**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ )
  625. - :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_tab_stops**\ (\ )
  626. Aligns text to the given tab-stops.
  627. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array<class_PackedFloat32Array>` for more details.
  628. .. rst-class:: classref-item-separator
  629. ----
  630. .. _class_RichTextLabel_property_text:
  631. .. rst-class:: classref-property
  632. :ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_RichTextLabel_property_text>`
  633. .. rst-class:: classref-property-setget
  634. - |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ )
  635. - :ref:`String<class_String>` **get_text**\ (\ )
  636. 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.
  637. \ **Note:** If :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` is ``true``, it is unadvised to use the ``+=`` operator with :ref:`text<class_RichTextLabel_property_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.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_RichTextLabel_property_text_direction:
  641. .. rst-class:: classref-property
  642. :ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_RichTextLabel_property_text_direction>`
  643. .. rst-class:: classref-property-setget
  644. - |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ )
  645. - :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ )
  646. Base text writing direction.
  647. .. rst-class:: classref-item-separator
  648. ----
  649. .. _class_RichTextLabel_property_threaded:
  650. .. rst-class:: classref-property
  651. :ref:`bool<class_bool>` **threaded** = ``false`` :ref:`🔗<class_RichTextLabel_property_threaded>`
  652. .. rst-class:: classref-property-setget
  653. - |void| **set_threaded**\ (\ value\: :ref:`bool<class_bool>`\ )
  654. - :ref:`bool<class_bool>` **is_threaded**\ (\ )
  655. If ``true``, text processing is done in a background thread.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_RichTextLabel_property_vertical_alignment:
  659. .. rst-class:: classref-property
  660. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``0`` :ref:`🔗<class_RichTextLabel_property_vertical_alignment>`
  661. .. rst-class:: classref-property-setget
  662. - |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>`\ )
  663. - :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment**\ (\ )
  664. Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` constants.
  665. .. rst-class:: classref-item-separator
  666. ----
  667. .. _class_RichTextLabel_property_visible_characters:
  668. .. rst-class:: classref-property
  669. :ref:`int<class_int>` **visible_characters** = ``-1`` :ref:`🔗<class_RichTextLabel_property_visible_characters>`
  670. .. rst-class:: classref-property-setget
  671. - |void| **set_visible_characters**\ (\ value\: :ref:`int<class_int>`\ )
  672. - :ref:`int<class_int>` **get_visible_characters**\ (\ )
  673. 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.
  674. \ **Note:** Setting this property updates :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` accordingly.
  675. .. rst-class:: classref-item-separator
  676. ----
  677. .. _class_RichTextLabel_property_visible_characters_behavior:
  678. .. rst-class:: classref-property
  679. :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **visible_characters_behavior** = ``0`` :ref:`🔗<class_RichTextLabel_property_visible_characters_behavior>`
  680. .. rst-class:: classref-property-setget
  681. - |void| **set_visible_characters_behavior**\ (\ value\: :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>`\ )
  682. - :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **get_visible_characters_behavior**\ (\ )
  683. 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.
  684. .. rst-class:: classref-item-separator
  685. ----
  686. .. _class_RichTextLabel_property_visible_ratio:
  687. .. rst-class:: classref-property
  688. :ref:`float<class_float>` **visible_ratio** = ``1.0`` :ref:`🔗<class_RichTextLabel_property_visible_ratio>`
  689. .. rst-class:: classref-property-setget
  690. - |void| **set_visible_ratio**\ (\ value\: :ref:`float<class_float>`\ )
  691. - :ref:`float<class_float>` **get_visible_ratio**\ (\ )
  692. 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.
  693. \ **Note:** Setting this property updates :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` accordingly.
  694. .. rst-class:: classref-section-separator
  695. ----
  696. .. rst-class:: classref-descriptions-group
  697. Method Descriptions
  698. -------------------
  699. .. _class_RichTextLabel_method_add_image:
  700. .. rst-class:: classref-method
  701. |void| **add_image**\ (\ image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), key\: :ref:`Variant<class_Variant>` = null, pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RichTextLabel_method_add_image>`
  702. 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.
  703. If ``width`` or ``height`` is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
  704. If ``width`` and ``height`` are not set, but ``region`` is, the region's rect will be used.
  705. \ ``key`` is an optional identifier, that can be used to modify the image via :ref:`update_image<class_RichTextLabel_method_update_image>`.
  706. If ``pad`` is set, and the image is smaller than the size specified by ``width`` and ``height``, the image padding is added to match the size instead of upscaling.
  707. If ``size_in_percent`` is set, ``width`` and ``height`` values are percentages of the control width instead of pixels.
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _class_RichTextLabel_method_add_text:
  711. .. rst-class:: classref-method
  712. |void| **add_text**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_add_text>`
  713. Adds raw non-BBCode-parsed text to the tag stack.
  714. .. rst-class:: classref-item-separator
  715. ----
  716. .. _class_RichTextLabel_method_append_text:
  717. .. rst-class:: classref-method
  718. |void| **append_text**\ (\ bbcode\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_append_text>`
  719. Parses ``bbcode`` and adds tags to the tag stack as needed.
  720. \ **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>`.
  721. .. rst-class:: classref-item-separator
  722. ----
  723. .. _class_RichTextLabel_method_clear:
  724. .. rst-class:: classref-method
  725. |void| **clear**\ (\ ) :ref:`🔗<class_RichTextLabel_method_clear>`
  726. Clears the tag stack, causing the label to display nothing.
  727. \ **Note:** This method does not affect :ref:`text<class_RichTextLabel_property_text>`, and its contents will show again if the label is redrawn. However, setting :ref:`text<class_RichTextLabel_property_text>` to an empty :ref:`String<class_String>` also clears the stack.
  728. .. rst-class:: classref-item-separator
  729. ----
  730. .. _class_RichTextLabel_method_deselect:
  731. .. rst-class:: classref-method
  732. |void| **deselect**\ (\ ) :ref:`🔗<class_RichTextLabel_method_deselect>`
  733. Clears the current selection.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_RichTextLabel_method_get_character_line:
  737. .. rst-class:: classref-method
  738. :ref:`int<class_int>` **get_character_line**\ (\ character\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_character_line>`
  739. Returns the line number of the character position provided. Line and character numbers are both zero-indexed.
  740. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  741. .. rst-class:: classref-item-separator
  742. ----
  743. .. _class_RichTextLabel_method_get_character_paragraph:
  744. .. rst-class:: classref-method
  745. :ref:`int<class_int>` **get_character_paragraph**\ (\ character\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_character_paragraph>`
  746. Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed.
  747. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  748. .. rst-class:: classref-item-separator
  749. ----
  750. .. _class_RichTextLabel_method_get_content_height:
  751. .. rst-class:: classref-method
  752. :ref:`int<class_int>` **get_content_height**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_content_height>`
  753. Returns the height of the content.
  754. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  755. .. rst-class:: classref-item-separator
  756. ----
  757. .. _class_RichTextLabel_method_get_content_width:
  758. .. rst-class:: classref-method
  759. :ref:`int<class_int>` **get_content_width**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_content_width>`
  760. Returns the width of the content.
  761. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  762. .. rst-class:: classref-item-separator
  763. ----
  764. .. _class_RichTextLabel_method_get_line_count:
  765. .. rst-class:: classref-method
  766. :ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_line_count>`
  767. Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
  768. \ **Note:** If :ref:`visible_characters_behavior<class_RichTextLabel_property_visible_characters_behavior>` is set to :ref:`TextServer.VC_CHARS_BEFORE_SHAPING<class_TextServer_constant_VC_CHARS_BEFORE_SHAPING>` only visible wrapped lines are counted.
  769. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  770. .. rst-class:: classref-item-separator
  771. ----
  772. .. _class_RichTextLabel_method_get_line_offset:
  773. .. rst-class:: classref-method
  774. :ref:`float<class_float>` **get_line_offset**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_line_offset>`
  775. Returns the vertical offset of the line found at the provided index.
  776. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  777. .. rst-class:: classref-item-separator
  778. ----
  779. .. _class_RichTextLabel_method_get_line_range:
  780. .. rst-class:: classref-method
  781. :ref:`Vector2i<class_Vector2i>` **get_line_range**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_line_range>`
  782. Returns the indexes of the first and last visible characters for the given ``line``, as a :ref:`Vector2i<class_Vector2i>`.
  783. \ **Note:** If :ref:`visible_characters_behavior<class_RichTextLabel_property_visible_characters_behavior>` is set to :ref:`TextServer.VC_CHARS_BEFORE_SHAPING<class_TextServer_constant_VC_CHARS_BEFORE_SHAPING>` only visible wrapped lines are counted.
  784. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  785. .. rst-class:: classref-item-separator
  786. ----
  787. .. _class_RichTextLabel_method_get_menu:
  788. .. rst-class:: classref-method
  789. :ref:`PopupMenu<class_PopupMenu>` **get_menu**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_menu>`
  790. Returns the :ref:`PopupMenu<class_PopupMenu>` of this **RichTextLabel**. By default, this menu is displayed when right-clicking on the **RichTextLabel**.
  791. You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see :ref:`MenuItems<enum_RichTextLabel_MenuItems>`). For example:
  792. .. tabs::
  793. .. code-tab:: gdscript
  794. func _ready():
  795. var menu = get_menu()
  796. # Remove "Select All" item.
  797. menu.remove_item(MENU_SELECT_ALL)
  798. # Add custom items.
  799. menu.add_separator()
  800. menu.add_item("Duplicate Text", MENU_MAX + 1)
  801. # Connect callback.
  802. menu.id_pressed.connect(_on_item_pressed)
  803. func _on_item_pressed(id):
  804. if id == MENU_MAX + 1:
  805. add_text("\n" + get_parsed_text())
  806. .. code-tab:: csharp
  807. public override void _Ready()
  808. {
  809. var menu = GetMenu();
  810. // Remove "Select All" item.
  811. menu.RemoveItem(RichTextLabel.MenuItems.SelectAll);
  812. // Add custom items.
  813. menu.AddSeparator();
  814. menu.AddItem("Duplicate Text", RichTextLabel.MenuItems.Max + 1);
  815. // Add event handler.
  816. menu.IdPressed += OnItemPressed;
  817. }
  818. public void OnItemPressed(int id)
  819. {
  820. if (id == TextEdit.MenuItems.Max + 1)
  821. {
  822. AddText("\n" + GetParsedText());
  823. }
  824. }
  825. \ **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.
  826. .. rst-class:: classref-item-separator
  827. ----
  828. .. _class_RichTextLabel_method_get_paragraph_count:
  829. .. rst-class:: classref-method
  830. :ref:`int<class_int>` **get_paragraph_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_paragraph_count>`
  831. Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack's text tags). Considers wrapped text as one paragraph.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _class_RichTextLabel_method_get_paragraph_offset:
  835. .. rst-class:: classref-method
  836. :ref:`float<class_float>` **get_paragraph_offset**\ (\ paragraph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_paragraph_offset>`
  837. Returns the vertical offset of the paragraph found at the provided index.
  838. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  839. .. rst-class:: classref-item-separator
  840. ----
  841. .. _class_RichTextLabel_method_get_parsed_text:
  842. .. rst-class:: classref-method
  843. :ref:`String<class_String>` **get_parsed_text**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_parsed_text>`
  844. Returns the text without BBCode mark-up.
  845. .. rst-class:: classref-item-separator
  846. ----
  847. .. _class_RichTextLabel_method_get_selected_text:
  848. .. rst-class:: classref-method
  849. :ref:`String<class_String>` **get_selected_text**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_selected_text>`
  850. Returns the current selection text. Does not include BBCodes.
  851. .. rst-class:: classref-item-separator
  852. ----
  853. .. _class_RichTextLabel_method_get_selection_from:
  854. .. rst-class:: classref-method
  855. :ref:`int<class_int>` **get_selection_from**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_selection_from>`
  856. Returns the current selection first character index if a selection is active, ``-1`` otherwise. Does not include BBCodes.
  857. .. rst-class:: classref-item-separator
  858. ----
  859. .. _class_RichTextLabel_method_get_selection_to:
  860. .. rst-class:: classref-method
  861. :ref:`int<class_int>` **get_selection_to**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_selection_to>`
  862. Returns the current selection last character index if a selection is active, ``-1`` otherwise. Does not include BBCodes.
  863. .. rst-class:: classref-item-separator
  864. ----
  865. .. _class_RichTextLabel_method_get_total_character_count:
  866. .. rst-class:: classref-method
  867. :ref:`int<class_int>` **get_total_character_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_total_character_count>`
  868. Returns the total number of characters from text tags. Does not include BBCodes.
  869. .. rst-class:: classref-item-separator
  870. ----
  871. .. _class_RichTextLabel_method_get_v_scroll_bar:
  872. .. rst-class:: classref-method
  873. :ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_RichTextLabel_method_get_v_scroll_bar>`
  874. Returns the vertical scrollbar.
  875. \ **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.
  876. .. rst-class:: classref-item-separator
  877. ----
  878. .. _class_RichTextLabel_method_get_visible_line_count:
  879. .. rst-class:: classref-method
  880. :ref:`int<class_int>` **get_visible_line_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_visible_line_count>`
  881. Returns the number of visible lines.
  882. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  883. .. rst-class:: classref-item-separator
  884. ----
  885. .. _class_RichTextLabel_method_get_visible_paragraph_count:
  886. .. rst-class:: classref-method
  887. :ref:`int<class_int>` **get_visible_paragraph_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_visible_paragraph_count>`
  888. Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
  889. \ **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_finished<class_RichTextLabel_method_is_finished>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded.
  890. .. rst-class:: classref-item-separator
  891. ----
  892. .. _class_RichTextLabel_method_install_effect:
  893. .. rst-class:: classref-method
  894. |void| **install_effect**\ (\ effect\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_method_install_effect>`
  895. Installs a custom effect. This can also be done in the Inspector through the :ref:`custom_effects<class_RichTextLabel_property_custom_effects>` property. ``effect`` should be a valid :ref:`RichTextEffect<class_RichTextEffect>`.
  896. \ **Example:** With the following script extending from :ref:`RichTextEffect<class_RichTextEffect>`:
  897. ::
  898. # effect.gd
  899. class_name MyCustomEffect
  900. extends RichTextEffect
  901. var bbcode = "my_custom_effect"
  902. # ...
  903. The above effect can be installed in **RichTextLabel** from a script:
  904. ::
  905. # rich_text_label.gd
  906. extends RichTextLabel
  907. func _ready():
  908. install_effect(MyCustomEffect.new())
  909. # Alternatively, if not using `class_name` in the script that extends RichTextEffect:
  910. install_effect(preload("res://effect.gd").new())
  911. .. rst-class:: classref-item-separator
  912. ----
  913. .. _class_RichTextLabel_method_invalidate_paragraph:
  914. .. rst-class:: classref-method
  915. :ref:`bool<class_bool>` **invalidate_paragraph**\ (\ paragraph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_invalidate_paragraph>`
  916. Invalidates ``paragraph`` and all subsequent paragraphs cache.
  917. .. rst-class:: classref-item-separator
  918. ----
  919. .. _class_RichTextLabel_method_is_finished:
  920. .. rst-class:: classref-method
  921. :ref:`bool<class_bool>` **is_finished**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_is_finished>`
  922. If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``.
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _class_RichTextLabel_method_is_menu_visible:
  926. .. rst-class:: classref-method
  927. :ref:`bool<class_bool>` **is_menu_visible**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_is_menu_visible>`
  928. Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided).
  929. .. rst-class:: classref-item-separator
  930. ----
  931. .. _class_RichTextLabel_method_is_ready:
  932. .. rst-class:: classref-method
  933. :ref:`bool<class_bool>` **is_ready**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_is_ready>`
  934. **Deprecated:** Use :ref:`is_finished<class_RichTextLabel_method_is_finished>` instead.
  935. If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``.
  936. .. rst-class:: classref-item-separator
  937. ----
  938. .. _class_RichTextLabel_method_menu_option:
  939. .. rst-class:: classref-method
  940. |void| **menu_option**\ (\ option\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_menu_option>`
  941. Executes a given action as defined in the :ref:`MenuItems<enum_RichTextLabel_MenuItems>` enum.
  942. .. rst-class:: classref-item-separator
  943. ----
  944. .. _class_RichTextLabel_method_newline:
  945. .. rst-class:: classref-method
  946. |void| **newline**\ (\ ) :ref:`🔗<class_RichTextLabel_method_newline>`
  947. Adds a newline tag to the tag stack.
  948. .. rst-class:: classref-item-separator
  949. ----
  950. .. _class_RichTextLabel_method_parse_bbcode:
  951. .. rst-class:: classref-method
  952. |void| **parse_bbcode**\ (\ bbcode\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_parse_bbcode>`
  953. The assignment version of :ref:`append_text<class_RichTextLabel_method_append_text>`. Clears the tag stack and inserts the new content.
  954. .. rst-class:: classref-item-separator
  955. ----
  956. .. _class_RichTextLabel_method_parse_expressions_for_values:
  957. .. rst-class:: classref-method
  958. :ref:`Dictionary<class_Dictionary>` **parse_expressions_for_values**\ (\ expressions\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_RichTextLabel_method_parse_expressions_for_values>`
  959. Parses BBCode parameter ``expressions`` into a dictionary.
  960. .. rst-class:: classref-item-separator
  961. ----
  962. .. _class_RichTextLabel_method_pop:
  963. .. rst-class:: classref-method
  964. |void| **pop**\ (\ ) :ref:`🔗<class_RichTextLabel_method_pop>`
  965. Terminates the current tag. Use after ``push_*`` methods to close BBCodes manually. Does not need to follow ``add_*`` methods.
  966. .. rst-class:: classref-item-separator
  967. ----
  968. .. _class_RichTextLabel_method_pop_all:
  969. .. rst-class:: classref-method
  970. |void| **pop_all**\ (\ ) :ref:`🔗<class_RichTextLabel_method_pop_all>`
  971. Terminates all tags opened by ``push_*`` methods.
  972. .. rst-class:: classref-item-separator
  973. ----
  974. .. _class_RichTextLabel_method_pop_context:
  975. .. rst-class:: classref-method
  976. |void| **pop_context**\ (\ ) :ref:`🔗<class_RichTextLabel_method_pop_context>`
  977. Terminates tags opened after the last :ref:`push_context<class_RichTextLabel_method_push_context>` call (including context marker), or all tags if there's no context marker on the stack.
  978. .. rst-class:: classref-item-separator
  979. ----
  980. .. _class_RichTextLabel_method_push_bgcolor:
  981. .. rst-class:: classref-method
  982. |void| **push_bgcolor**\ (\ bgcolor\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_bgcolor>`
  983. Adds a ``[bgcolor]`` tag to the tag stack.
  984. .. rst-class:: classref-item-separator
  985. ----
  986. .. _class_RichTextLabel_method_push_bold:
  987. .. rst-class:: classref-method
  988. |void| **push_bold**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_bold>`
  989. 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.
  990. .. rst-class:: classref-item-separator
  991. ----
  992. .. _class_RichTextLabel_method_push_bold_italics:
  993. .. rst-class:: classref-method
  994. |void| **push_bold_italics**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_bold_italics>`
  995. Adds a ``[font]`` tag with a bold italics font to the tag stack.
  996. .. rst-class:: classref-item-separator
  997. ----
  998. .. _class_RichTextLabel_method_push_cell:
  999. .. rst-class:: classref-method
  1000. |void| **push_cell**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_cell>`
  1001. 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. Use :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>` to set column expansion ratio, :ref:`set_cell_border_color<class_RichTextLabel_method_set_cell_border_color>` to set cell border, :ref:`set_cell_row_background_color<class_RichTextLabel_method_set_cell_row_background_color>` to set cell background, :ref:`set_cell_size_override<class_RichTextLabel_method_set_cell_size_override>` to override cell size, and :ref:`set_cell_padding<class_RichTextLabel_method_set_cell_padding>` to set padding.
  1002. .. rst-class:: classref-item-separator
  1003. ----
  1004. .. _class_RichTextLabel_method_push_color:
  1005. .. rst-class:: classref-method
  1006. |void| **push_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_color>`
  1007. Adds a ``[color]`` tag to the tag stack.
  1008. .. rst-class:: classref-item-separator
  1009. ----
  1010. .. _class_RichTextLabel_method_push_context:
  1011. .. rst-class:: classref-method
  1012. |void| **push_context**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_context>`
  1013. Adds a context marker to the tag stack. See :ref:`pop_context<class_RichTextLabel_method_pop_context>`.
  1014. .. rst-class:: classref-item-separator
  1015. ----
  1016. .. _class_RichTextLabel_method_push_customfx:
  1017. .. rst-class:: classref-method
  1018. |void| **push_customfx**\ (\ effect\: :ref:`RichTextEffect<class_RichTextEffect>`, env\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_RichTextLabel_method_push_customfx>`
  1019. Adds a custom effect tag to the tag stack. The effect does not need to be in :ref:`custom_effects<class_RichTextLabel_property_custom_effects>`. The environment is directly passed to the effect.
  1020. .. rst-class:: classref-item-separator
  1021. ----
  1022. .. _class_RichTextLabel_method_push_dropcap:
  1023. .. rst-class:: classref-method
  1024. |void| **push_dropcap**\ (\ string\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, size\: :ref:`int<class_int>`, dropcap_margins\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), outline_size\: :ref:`int<class_int>` = 0, outline_color\: :ref:`Color<class_Color>` = Color(0, 0, 0, 0)\ ) :ref:`🔗<class_RichTextLabel_method_push_dropcap>`
  1025. 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.
  1026. .. rst-class:: classref-item-separator
  1027. ----
  1028. .. _class_RichTextLabel_method_push_fgcolor:
  1029. .. rst-class:: classref-method
  1030. |void| **push_fgcolor**\ (\ fgcolor\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_fgcolor>`
  1031. Adds a ``[fgcolor]`` tag to the tag stack.
  1032. .. rst-class:: classref-item-separator
  1033. ----
  1034. .. _class_RichTextLabel_method_push_font:
  1035. .. rst-class:: classref-method
  1036. |void| **push_font**\ (\ font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RichTextLabel_method_push_font>`
  1037. Adds a ``[font]`` tag to the tag stack. Overrides default fonts for its duration.
  1038. Passing ``0`` to ``font_size`` will use the existing default font size.
  1039. .. rst-class:: classref-item-separator
  1040. ----
  1041. .. _class_RichTextLabel_method_push_font_size:
  1042. .. rst-class:: classref-method
  1043. |void| **push_font_size**\ (\ font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_push_font_size>`
  1044. Adds a ``[font_size]`` tag to the tag stack. Overrides default font size for its duration.
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_RichTextLabel_method_push_hint:
  1048. .. rst-class:: classref-method
  1049. |void| **push_hint**\ (\ description\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_push_hint>`
  1050. Adds a ``[hint]`` tag to the tag stack. Same as BBCode ``[hint=something]{text}[/hint]``.
  1051. .. rst-class:: classref-item-separator
  1052. ----
  1053. .. _class_RichTextLabel_method_push_indent:
  1054. .. rst-class:: classref-method
  1055. |void| **push_indent**\ (\ level\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_push_indent>`
  1056. 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.
  1057. .. rst-class:: classref-item-separator
  1058. ----
  1059. .. _class_RichTextLabel_method_push_italics:
  1060. .. rst-class:: classref-method
  1061. |void| **push_italics**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_italics>`
  1062. Adds a ``[font]`` tag with an italics font to the tag stack. This is the same as adding an ``[i]`` tag if not currently in a ``[b]`` tag.
  1063. .. rst-class:: classref-item-separator
  1064. ----
  1065. .. _class_RichTextLabel_method_push_language:
  1066. .. rst-class:: classref-method
  1067. |void| **push_language**\ (\ language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_push_language>`
  1068. Adds language code used for text shaping algorithm and Open-Type font features.
  1069. .. rst-class:: classref-item-separator
  1070. ----
  1071. .. _class_RichTextLabel_method_push_list:
  1072. .. rst-class:: classref-method
  1073. |void| **push_list**\ (\ level\: :ref:`int<class_int>`, type\: :ref:`ListType<enum_RichTextLabel_ListType>`, capitalize\: :ref:`bool<class_bool>`, bullet\: :ref:`String<class_String>` = "•"\ ) :ref:`🔗<class_RichTextLabel_method_push_list>`
  1074. 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.
  1075. .. rst-class:: classref-item-separator
  1076. ----
  1077. .. _class_RichTextLabel_method_push_meta:
  1078. .. rst-class:: classref-method
  1079. |void| **push_meta**\ (\ data\: :ref:`Variant<class_Variant>`, underline_mode\: :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` = 1, tooltip\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_RichTextLabel_method_push_meta>`
  1080. 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.
  1081. If :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``, meta tags display an underline. This behavior can be customized with ``underline_mode``.
  1082. \ **Note:** Meta tags do nothing by default when clicked. To assign behavior when clicked, connect :ref:`meta_clicked<class_RichTextLabel_signal_meta_clicked>` to a function that is called when the meta tag is clicked.
  1083. .. rst-class:: classref-item-separator
  1084. ----
  1085. .. _class_RichTextLabel_method_push_mono:
  1086. .. rst-class:: classref-method
  1087. |void| **push_mono**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_mono>`
  1088. Adds a ``[font]`` tag with a monospace font to the tag stack.
  1089. .. rst-class:: classref-item-separator
  1090. ----
  1091. .. _class_RichTextLabel_method_push_normal:
  1092. .. rst-class:: classref-method
  1093. |void| **push_normal**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_normal>`
  1094. Adds a ``[font]`` tag with a normal font to the tag stack.
  1095. .. rst-class:: classref-item-separator
  1096. ----
  1097. .. _class_RichTextLabel_method_push_outline_color:
  1098. .. rst-class:: classref-method
  1099. |void| **push_outline_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_outline_color>`
  1100. Adds a ``[outline_color]`` tag to the tag stack. Adds text outline for its duration.
  1101. .. rst-class:: classref-item-separator
  1102. ----
  1103. .. _class_RichTextLabel_method_push_outline_size:
  1104. .. rst-class:: classref-method
  1105. |void| **push_outline_size**\ (\ outline_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_push_outline_size>`
  1106. Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline size for its duration.
  1107. .. rst-class:: classref-item-separator
  1108. ----
  1109. .. _class_RichTextLabel_method_push_paragraph:
  1110. .. rst-class:: classref-method
  1111. |void| **push_paragraph**\ (\ alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`, base_direction\: :ref:`TextDirection<enum_Control_TextDirection>` = 0, language\: :ref:`String<class_String>` = "", st_parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` = 0, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 163, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array()\ ) :ref:`🔗<class_RichTextLabel_method_push_paragraph>`
  1112. Adds a ``[p]`` tag to the tag stack.
  1113. .. rst-class:: classref-item-separator
  1114. ----
  1115. .. _class_RichTextLabel_method_push_strikethrough:
  1116. .. rst-class:: classref-method
  1117. |void| **push_strikethrough**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_strikethrough>`
  1118. Adds a ``[s]`` tag to the tag stack.
  1119. .. rst-class:: classref-item-separator
  1120. ----
  1121. .. _class_RichTextLabel_method_push_table:
  1122. .. rst-class:: classref-method
  1123. |void| **push_table**\ (\ columns\: :ref:`int<class_int>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 0, align_to_row\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_RichTextLabel_method_push_table>`
  1124. Adds a ``[table=columns,inline_align]`` tag to the tag stack. Use :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>` to set column expansion ratio. Use :ref:`push_cell<class_RichTextLabel_method_push_cell>` to add cells.
  1125. .. rst-class:: classref-item-separator
  1126. ----
  1127. .. _class_RichTextLabel_method_push_underline:
  1128. .. rst-class:: classref-method
  1129. |void| **push_underline**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_underline>`
  1130. Adds a ``[u]`` tag to the tag stack.
  1131. .. rst-class:: classref-item-separator
  1132. ----
  1133. .. _class_RichTextLabel_method_remove_paragraph:
  1134. .. rst-class:: classref-method
  1135. :ref:`bool<class_bool>` **remove_paragraph**\ (\ paragraph\: :ref:`int<class_int>`, no_invalidate\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RichTextLabel_method_remove_paragraph>`
  1136. Removes a paragraph of content from the label. Returns ``true`` if the paragraph exists.
  1137. The ``paragraph`` argument is the index of the paragraph to remove, it can take values in the interval ``[0, get_paragraph_count() - 1]``.
  1138. If ``no_invalidate`` is set to ``true``, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and :ref:`invalidate_paragraph<class_RichTextLabel_method_invalidate_paragraph>` will be called at the end of operation.
  1139. .. rst-class:: classref-item-separator
  1140. ----
  1141. .. _class_RichTextLabel_method_scroll_to_line:
  1142. .. rst-class:: classref-method
  1143. |void| **scroll_to_line**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_scroll_to_line>`
  1144. Scrolls the window's top line to match ``line``.
  1145. .. rst-class:: classref-item-separator
  1146. ----
  1147. .. _class_RichTextLabel_method_scroll_to_paragraph:
  1148. .. rst-class:: classref-method
  1149. |void| **scroll_to_paragraph**\ (\ paragraph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_scroll_to_paragraph>`
  1150. Scrolls the window's top line to match first line of the ``paragraph``.
  1151. .. rst-class:: classref-item-separator
  1152. ----
  1153. .. _class_RichTextLabel_method_scroll_to_selection:
  1154. .. rst-class:: classref-method
  1155. |void| **scroll_to_selection**\ (\ ) :ref:`🔗<class_RichTextLabel_method_scroll_to_selection>`
  1156. Scrolls to the beginning of the current selection.
  1157. .. rst-class:: classref-item-separator
  1158. ----
  1159. .. _class_RichTextLabel_method_select_all:
  1160. .. rst-class:: classref-method
  1161. |void| **select_all**\ (\ ) :ref:`🔗<class_RichTextLabel_method_select_all>`
  1162. Select all the text.
  1163. If :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` is ``false``, no selection will occur.
  1164. .. rst-class:: classref-item-separator
  1165. ----
  1166. .. _class_RichTextLabel_method_set_cell_border_color:
  1167. .. rst-class:: classref-method
  1168. |void| **set_cell_border_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_border_color>`
  1169. Sets color of a table cell border.
  1170. .. rst-class:: classref-item-separator
  1171. ----
  1172. .. _class_RichTextLabel_method_set_cell_padding:
  1173. .. rst-class:: classref-method
  1174. |void| **set_cell_padding**\ (\ padding\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_padding>`
  1175. Sets inner padding of a table cell.
  1176. .. rst-class:: classref-item-separator
  1177. ----
  1178. .. _class_RichTextLabel_method_set_cell_row_background_color:
  1179. .. rst-class:: classref-method
  1180. |void| **set_cell_row_background_color**\ (\ odd_row_bg\: :ref:`Color<class_Color>`, even_row_bg\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_row_background_color>`
  1181. Sets color of a table cell. Separate colors for alternating rows can be specified.
  1182. .. rst-class:: classref-item-separator
  1183. ----
  1184. .. _class_RichTextLabel_method_set_cell_size_override:
  1185. .. rst-class:: classref-method
  1186. |void| **set_cell_size_override**\ (\ min_size\: :ref:`Vector2<class_Vector2>`, max_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_size_override>`
  1187. Sets minimum and maximum size overrides for a table cell.
  1188. .. rst-class:: classref-item-separator
  1189. ----
  1190. .. _class_RichTextLabel_method_set_table_column_expand:
  1191. .. rst-class:: classref-method
  1192. |void| **set_table_column_expand**\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`, ratio\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_RichTextLabel_method_set_table_column_expand>`
  1193. 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.
  1194. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
  1195. If ``expand`` is ``false``, the column will not contribute to the total ratio.
  1196. .. rst-class:: classref-item-separator
  1197. ----
  1198. .. _class_RichTextLabel_method_update_image:
  1199. .. rst-class:: classref-method
  1200. |void| **update_image**\ (\ key\: :ref:`Variant<class_Variant>`, mask\: |bitfield|\[:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>`\], image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RichTextLabel_method_update_image>`
  1201. Updates the existing images with the key ``key``. Only properties specified by ``mask`` bits are updated. See :ref:`add_image<class_RichTextLabel_method_add_image>`.
  1202. .. rst-class:: classref-section-separator
  1203. ----
  1204. .. rst-class:: classref-descriptions-group
  1205. Theme Property Descriptions
  1206. ---------------------------
  1207. .. _class_RichTextLabel_theme_color_default_color:
  1208. .. rst-class:: classref-themeproperty
  1209. :ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_RichTextLabel_theme_color_default_color>`
  1210. The default text color.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_RichTextLabel_theme_color_font_outline_color:
  1214. .. rst-class:: classref-themeproperty
  1215. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_RichTextLabel_theme_color_font_outline_color>`
  1216. The default tint of text outline.
  1217. .. rst-class:: classref-item-separator
  1218. ----
  1219. .. _class_RichTextLabel_theme_color_font_selected_color:
  1220. .. rst-class:: classref-themeproperty
  1221. :ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_font_selected_color>`
  1222. 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.
  1223. .. rst-class:: classref-item-separator
  1224. ----
  1225. .. _class_RichTextLabel_theme_color_font_shadow_color:
  1226. .. rst-class:: classref-themeproperty
  1227. :ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_font_shadow_color>`
  1228. The color of the font's shadow.
  1229. .. rst-class:: classref-item-separator
  1230. ----
  1231. .. _class_RichTextLabel_theme_color_selection_color:
  1232. .. rst-class:: classref-themeproperty
  1233. :ref:`Color<class_Color>` **selection_color** = ``Color(0.1, 0.1, 1, 0.8)`` :ref:`🔗<class_RichTextLabel_theme_color_selection_color>`
  1234. The color of the selection box.
  1235. .. rst-class:: classref-item-separator
  1236. ----
  1237. .. _class_RichTextLabel_theme_color_table_border:
  1238. .. rst-class:: classref-themeproperty
  1239. :ref:`Color<class_Color>` **table_border** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_table_border>`
  1240. The default cell border color.
  1241. .. rst-class:: classref-item-separator
  1242. ----
  1243. .. _class_RichTextLabel_theme_color_table_even_row_bg:
  1244. .. rst-class:: classref-themeproperty
  1245. :ref:`Color<class_Color>` **table_even_row_bg** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_table_even_row_bg>`
  1246. The default background color for even rows.
  1247. .. rst-class:: classref-item-separator
  1248. ----
  1249. .. _class_RichTextLabel_theme_color_table_odd_row_bg:
  1250. .. rst-class:: classref-themeproperty
  1251. :ref:`Color<class_Color>` **table_odd_row_bg** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_table_odd_row_bg>`
  1252. The default background color for odd rows.
  1253. .. rst-class:: classref-item-separator
  1254. ----
  1255. .. _class_RichTextLabel_theme_constant_line_separation:
  1256. .. rst-class:: classref-themeproperty
  1257. :ref:`int<class_int>` **line_separation** = ``0`` :ref:`🔗<class_RichTextLabel_theme_constant_line_separation>`
  1258. Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
  1259. .. rst-class:: classref-item-separator
  1260. ----
  1261. .. _class_RichTextLabel_theme_constant_outline_size:
  1262. .. rst-class:: classref-themeproperty
  1263. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_RichTextLabel_theme_constant_outline_size>`
  1264. The size of the text outline.
  1265. \ **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.
  1266. .. rst-class:: classref-item-separator
  1267. ----
  1268. .. _class_RichTextLabel_theme_constant_shadow_offset_x:
  1269. .. rst-class:: classref-themeproperty
  1270. :ref:`int<class_int>` **shadow_offset_x** = ``1`` :ref:`🔗<class_RichTextLabel_theme_constant_shadow_offset_x>`
  1271. The horizontal offset of the font's shadow.
  1272. .. rst-class:: classref-item-separator
  1273. ----
  1274. .. _class_RichTextLabel_theme_constant_shadow_offset_y:
  1275. .. rst-class:: classref-themeproperty
  1276. :ref:`int<class_int>` **shadow_offset_y** = ``1`` :ref:`🔗<class_RichTextLabel_theme_constant_shadow_offset_y>`
  1277. The vertical offset of the font's shadow.
  1278. .. rst-class:: classref-item-separator
  1279. ----
  1280. .. _class_RichTextLabel_theme_constant_shadow_outline_size:
  1281. .. rst-class:: classref-themeproperty
  1282. :ref:`int<class_int>` **shadow_outline_size** = ``1`` :ref:`🔗<class_RichTextLabel_theme_constant_shadow_outline_size>`
  1283. The size of the shadow outline.
  1284. .. rst-class:: classref-item-separator
  1285. ----
  1286. .. _class_RichTextLabel_theme_constant_table_h_separation:
  1287. .. rst-class:: classref-themeproperty
  1288. :ref:`int<class_int>` **table_h_separation** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_table_h_separation>`
  1289. The horizontal separation of elements in a table.
  1290. .. rst-class:: classref-item-separator
  1291. ----
  1292. .. _class_RichTextLabel_theme_constant_table_v_separation:
  1293. .. rst-class:: classref-themeproperty
  1294. :ref:`int<class_int>` **table_v_separation** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_table_v_separation>`
  1295. The vertical separation of elements in a table.
  1296. .. rst-class:: classref-item-separator
  1297. ----
  1298. .. _class_RichTextLabel_theme_constant_text_highlight_h_padding:
  1299. .. rst-class:: classref-themeproperty
  1300. :ref:`int<class_int>` **text_highlight_h_padding** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_text_highlight_h_padding>`
  1301. The horizontal padding around boxes drawn by the ``[fgcolor]`` and ``[bgcolor]`` tags. This does not affect the appearance of text selection.
  1302. .. rst-class:: classref-item-separator
  1303. ----
  1304. .. _class_RichTextLabel_theme_constant_text_highlight_v_padding:
  1305. .. rst-class:: classref-themeproperty
  1306. :ref:`int<class_int>` **text_highlight_v_padding** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_text_highlight_v_padding>`
  1307. The vertical padding around boxes drawn by the ``[fgcolor]`` and ``[bgcolor]`` tags. This does not affect the appearance of text selection.
  1308. .. rst-class:: classref-item-separator
  1309. ----
  1310. .. _class_RichTextLabel_theme_font_bold_font:
  1311. .. rst-class:: classref-themeproperty
  1312. :ref:`Font<class_Font>` **bold_font** :ref:`🔗<class_RichTextLabel_theme_font_bold_font>`
  1313. The font used for bold text.
  1314. .. rst-class:: classref-item-separator
  1315. ----
  1316. .. _class_RichTextLabel_theme_font_bold_italics_font:
  1317. .. rst-class:: classref-themeproperty
  1318. :ref:`Font<class_Font>` **bold_italics_font** :ref:`🔗<class_RichTextLabel_theme_font_bold_italics_font>`
  1319. The font used for bold italics text.
  1320. .. rst-class:: classref-item-separator
  1321. ----
  1322. .. _class_RichTextLabel_theme_font_italics_font:
  1323. .. rst-class:: classref-themeproperty
  1324. :ref:`Font<class_Font>` **italics_font** :ref:`🔗<class_RichTextLabel_theme_font_italics_font>`
  1325. The font used for italics text.
  1326. .. rst-class:: classref-item-separator
  1327. ----
  1328. .. _class_RichTextLabel_theme_font_mono_font:
  1329. .. rst-class:: classref-themeproperty
  1330. :ref:`Font<class_Font>` **mono_font** :ref:`🔗<class_RichTextLabel_theme_font_mono_font>`
  1331. The font used for monospace text.
  1332. .. rst-class:: classref-item-separator
  1333. ----
  1334. .. _class_RichTextLabel_theme_font_normal_font:
  1335. .. rst-class:: classref-themeproperty
  1336. :ref:`Font<class_Font>` **normal_font** :ref:`🔗<class_RichTextLabel_theme_font_normal_font>`
  1337. The default text font.
  1338. .. rst-class:: classref-item-separator
  1339. ----
  1340. .. _class_RichTextLabel_theme_font_size_bold_font_size:
  1341. .. rst-class:: classref-themeproperty
  1342. :ref:`int<class_int>` **bold_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_bold_font_size>`
  1343. The font size used for bold text.
  1344. .. rst-class:: classref-item-separator
  1345. ----
  1346. .. _class_RichTextLabel_theme_font_size_bold_italics_font_size:
  1347. .. rst-class:: classref-themeproperty
  1348. :ref:`int<class_int>` **bold_italics_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_bold_italics_font_size>`
  1349. The font size used for bold italics text.
  1350. .. rst-class:: classref-item-separator
  1351. ----
  1352. .. _class_RichTextLabel_theme_font_size_italics_font_size:
  1353. .. rst-class:: classref-themeproperty
  1354. :ref:`int<class_int>` **italics_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_italics_font_size>`
  1355. The font size used for italics text.
  1356. .. rst-class:: classref-item-separator
  1357. ----
  1358. .. _class_RichTextLabel_theme_font_size_mono_font_size:
  1359. .. rst-class:: classref-themeproperty
  1360. :ref:`int<class_int>` **mono_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_mono_font_size>`
  1361. The font size used for monospace text.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_RichTextLabel_theme_font_size_normal_font_size:
  1365. .. rst-class:: classref-themeproperty
  1366. :ref:`int<class_int>` **normal_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_normal_font_size>`
  1367. The default text font size.
  1368. .. rst-class:: classref-item-separator
  1369. ----
  1370. .. _class_RichTextLabel_theme_style_focus:
  1371. .. rst-class:: classref-themeproperty
  1372. :ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_RichTextLabel_theme_style_focus>`
  1373. The background used when the **RichTextLabel** is focused. The :ref:`focus<class_RichTextLabel_theme_style_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.
  1374. .. rst-class:: classref-item-separator
  1375. ----
  1376. .. _class_RichTextLabel_theme_style_normal:
  1377. .. rst-class:: classref-themeproperty
  1378. :ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_RichTextLabel_theme_style_normal>`
  1379. The normal background for the **RichTextLabel**.
  1380. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1381. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1382. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1383. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1384. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1385. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1386. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1387. .. |void| replace:: :abbr:`void (No return value.)`