class_richtextlabel.rst 190 KB

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