class_richtextlabel.rst 144 KB

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