123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
- .. _class_RichTextLabel:
- RichTextLabel
- =============
- **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Label that displays rich text.
- Member Functions
- ----------------
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_image<class_RichTextLabel_add_image>` **(** :ref:`Texture<class_texture>` image **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_text<class_RichTextLabel_add_text>` **(** :ref:`String<class_string>` text **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`append_bbcode<class_RichTextLabel_append_bbcode>` **(** :ref:`String<class_string>` bbcode **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`clear<class_RichTextLabel_clear>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_bbcode<class_RichTextLabel_get_bbcode>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_percent_visible<class_RichTextLabel_get_percent_visible>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_tab_size<class_RichTextLabel_get_tab_size>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`String<class_string>` | :ref:`get_text<class_RichTextLabel_get_text>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_total_character_count<class_RichTextLabel_get_total_character_count>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`VScrollBar<class_vscrollbar>` | :ref:`get_v_scroll<class_RichTextLabel_get_v_scroll>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_visible_characters<class_RichTextLabel_get_visible_characters>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_meta_underlined<class_RichTextLabel_is_meta_underlined>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_scroll_active<class_RichTextLabel_is_scroll_active>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_scroll_following<class_RichTextLabel_is_scroll_following>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_selection_enabled<class_RichTextLabel_is_selection_enabled>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_using_bbcode<class_RichTextLabel_is_using_bbcode>` **(** **)** const |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`newline<class_RichTextLabel_newline>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`parse_bbcode<class_RichTextLabel_parse_bbcode>` **(** :ref:`String<class_string>` bbcode **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`pop<class_RichTextLabel_pop>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_align<class_RichTextLabel_push_align>` **(** :ref:`int<class_int>` align **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_cell<class_RichTextLabel_push_cell>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_color<class_RichTextLabel_push_color>` **(** :ref:`Color<class_color>` color **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_font<class_RichTextLabel_push_font>` **(** :ref:`Font<class_font>` font **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_indent<class_RichTextLabel_push_indent>` **(** :ref:`int<class_int>` level **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_list<class_RichTextLabel_push_list>` **(** :ref:`int<class_int>` type **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_meta<class_RichTextLabel_push_meta>` **(** :ref:`Variant<class_variant>` data **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_table<class_RichTextLabel_push_table>` **(** :ref:`int<class_int>` columns **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`push_underline<class_RichTextLabel_push_underline>` **(** **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`remove_line<class_RichTextLabel_remove_line>` **(** :ref:`int<class_int>` arg0 **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`scroll_to_line<class_RichTextLabel_scroll_to_line>` **(** :ref:`int<class_int>` line **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_bbcode<class_RichTextLabel_set_bbcode>` **(** :ref:`String<class_string>` text **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_meta_underline<class_RichTextLabel_set_meta_underline>` **(** :ref:`bool<class_bool>` enable **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_percent_visible<class_RichTextLabel_set_percent_visible>` **(** :ref:`float<class_float>` percent_visible **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_scroll_active<class_RichTextLabel_set_scroll_active>` **(** :ref:`bool<class_bool>` active **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_scroll_follow<class_RichTextLabel_set_scroll_follow>` **(** :ref:`bool<class_bool>` follow **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_selection_enabled<class_RichTextLabel_set_selection_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_tab_size<class_RichTextLabel_set_tab_size>` **(** :ref:`int<class_int>` spaces **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_table_column_expand<class_RichTextLabel_set_table_column_expand>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand, :ref:`int<class_int>` ratio **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_text<class_RichTextLabel_set_text>` **(** :ref:`String<class_string>` text **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_use_bbcode<class_RichTextLabel_set_use_bbcode>` **(** :ref:`bool<class_bool>` enable **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_visible_characters<class_RichTextLabel_set_visible_characters>` **(** :ref:`int<class_int>` amount **)** |
- +--------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Signals
- -------
- - **meta_clicked** **(** :ref:`Nil<class_nil>` meta **)**
- Numeric Constants
- -----------------
- - **ALIGN_LEFT** = **0**
- - **ALIGN_CENTER** = **1**
- - **ALIGN_RIGHT** = **2**
- - **ALIGN_FILL** = **3**
- - **LIST_NUMBERS** = **0**
- - **LIST_LETTERS** = **1**
- - **LIST_DOTS** = **2**
- - **ITEM_FRAME** = **0**
- - **ITEM_TEXT** = **1**
- - **ITEM_IMAGE** = **2**
- - **ITEM_NEWLINE** = **3**
- - **ITEM_FONT** = **4**
- - **ITEM_COLOR** = **5**
- - **ITEM_UNDERLINE** = **6**
- - **ITEM_ALIGN** = **7**
- - **ITEM_INDENT** = **8**
- - **ITEM_LIST** = **9**
- - **ITEM_META** = **11**
- Description
- -----------
- Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights.
- Member Function Description
- ---------------------------
- .. _class_RichTextLabel_add_image:
- - void **add_image** **(** :ref:`Texture<class_texture>` image **)**
- .. _class_RichTextLabel_add_text:
- - void **add_text** **(** :ref:`String<class_string>` text **)**
- .. _class_RichTextLabel_append_bbcode:
- - :ref:`int<class_int>` **append_bbcode** **(** :ref:`String<class_string>` bbcode **)**
- .. _class_RichTextLabel_clear:
- - void **clear** **(** **)**
- .. _class_RichTextLabel_get_bbcode:
- - :ref:`String<class_string>` **get_bbcode** **(** **)** const
- .. _class_RichTextLabel_get_percent_visible:
- - :ref:`float<class_float>` **get_percent_visible** **(** **)** const
- .. _class_RichTextLabel_get_tab_size:
- - :ref:`int<class_int>` **get_tab_size** **(** **)** const
- .. _class_RichTextLabel_get_text:
- - :ref:`String<class_string>` **get_text** **(** **)**
- Returns the raw text, stripping out the formatting information.
- .. _class_RichTextLabel_get_total_character_count:
- - :ref:`int<class_int>` **get_total_character_count** **(** **)** const
- .. _class_RichTextLabel_get_v_scroll:
- - :ref:`VScrollBar<class_vscrollbar>` **get_v_scroll** **(** **)**
- .. _class_RichTextLabel_get_visible_characters:
- - :ref:`int<class_int>` **get_visible_characters** **(** **)** const
- .. _class_RichTextLabel_is_meta_underlined:
- - :ref:`bool<class_bool>` **is_meta_underlined** **(** **)** const
- .. _class_RichTextLabel_is_scroll_active:
- - :ref:`bool<class_bool>` **is_scroll_active** **(** **)** const
- .. _class_RichTextLabel_is_scroll_following:
- - :ref:`bool<class_bool>` **is_scroll_following** **(** **)** const
- .. _class_RichTextLabel_is_selection_enabled:
- - :ref:`bool<class_bool>` **is_selection_enabled** **(** **)** const
- Return true if selecting the text inside this richtext is allowed.
- .. _class_RichTextLabel_is_using_bbcode:
- - :ref:`bool<class_bool>` **is_using_bbcode** **(** **)** const
- .. _class_RichTextLabel_newline:
- - void **newline** **(** **)**
- .. _class_RichTextLabel_parse_bbcode:
- - :ref:`int<class_int>` **parse_bbcode** **(** :ref:`String<class_string>` bbcode **)**
- .. _class_RichTextLabel_pop:
- - void **pop** **(** **)**
- .. _class_RichTextLabel_push_align:
- - void **push_align** **(** :ref:`int<class_int>` align **)**
- .. _class_RichTextLabel_push_cell:
- - void **push_cell** **(** **)**
- .. _class_RichTextLabel_push_color:
- - void **push_color** **(** :ref:`Color<class_color>` color **)**
- .. _class_RichTextLabel_push_font:
- - void **push_font** **(** :ref:`Font<class_font>` font **)**
- .. _class_RichTextLabel_push_indent:
- - void **push_indent** **(** :ref:`int<class_int>` level **)**
- .. _class_RichTextLabel_push_list:
- - void **push_list** **(** :ref:`int<class_int>` type **)**
- .. _class_RichTextLabel_push_meta:
- - void **push_meta** **(** :ref:`Variant<class_variant>` data **)**
- .. _class_RichTextLabel_push_table:
- - void **push_table** **(** :ref:`int<class_int>` columns **)**
- .. _class_RichTextLabel_push_underline:
- - void **push_underline** **(** **)**
- .. _class_RichTextLabel_remove_line:
- - :ref:`bool<class_bool>` **remove_line** **(** :ref:`int<class_int>` arg0 **)**
- .. _class_RichTextLabel_scroll_to_line:
- - void **scroll_to_line** **(** :ref:`int<class_int>` line **)**
- .. _class_RichTextLabel_set_bbcode:
- - void **set_bbcode** **(** :ref:`String<class_string>` text **)**
- .. _class_RichTextLabel_set_meta_underline:
- - void **set_meta_underline** **(** :ref:`bool<class_bool>` enable **)**
- .. _class_RichTextLabel_set_percent_visible:
- - void **set_percent_visible** **(** :ref:`float<class_float>` percent_visible **)**
- .. _class_RichTextLabel_set_scroll_active:
- - void **set_scroll_active** **(** :ref:`bool<class_bool>` active **)**
- .. _class_RichTextLabel_set_scroll_follow:
- - void **set_scroll_follow** **(** :ref:`bool<class_bool>` follow **)**
- .. _class_RichTextLabel_set_selection_enabled:
- - void **set_selection_enabled** **(** :ref:`bool<class_bool>` enabled **)**
- Set to true if selecting the text inside this richtext is allowed.
- .. _class_RichTextLabel_set_tab_size:
- - void **set_tab_size** **(** :ref:`int<class_int>` spaces **)**
- .. _class_RichTextLabel_set_table_column_expand:
- - void **set_table_column_expand** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand, :ref:`int<class_int>` ratio **)**
- .. _class_RichTextLabel_set_text:
- - void **set_text** **(** :ref:`String<class_string>` text **)**
- .. _class_RichTextLabel_set_use_bbcode:
- - void **set_use_bbcode** **(** :ref:`bool<class_bool>` enable **)**
- .. _class_RichTextLabel_set_visible_characters:
- - void **set_visible_characters** **(** :ref:`int<class_int>` amount **)**
|