Adds an image's opening and closing tags to the tag stack, optionally providing a width and height to resize the image. If width or height is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
Adds raw non-BBCode-parsed text to the tag stack.
Parses bbcode and adds tags to the tag stack as needed. Returns the result of the parsing, constant OK if successful. Note: Using this method, you can't close a tag that was opened in a previous appendBbcode 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 bbcodeText instead of using appendBbcode.
Clears the tag stack and sets bbcodeText to an empty string.
Returns the height of the content.
Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line.
Returns the total number of characters from text tags. Does not include BBCodes.
Returns the vertical scrollbar.
Returns the number of visible lines.
Installs a custom effect. effect should be a valid RichTextEffect.
Adds a newline tag to the tag stack.
The assignment version of appendBbcode. Clears the tag stack and inserts the new content. Returns constant OK if parses bbcode successfully.
Parses BBCode parameter expressions into a dictionary.
Terminates the current tag. Use after push_* methods to close BBCodes manually. Does not need to follow add_* methods.
Adds an $(D align) tag based on the given align value. See _align for possible values.
Adds a $(D font) tag with a bold font to the tag stack. This is the same as adding a $(D b) tag if not currently in a $(D i) tag.
Adds a $(D font) tag with a bold italics font to the tag stack.
Adds a $(D cell) tag to the tag stack. Must be inside a $(D table) tag. See pushTable for details.
Adds a $(D color) tag to the tag stack.
Adds a $(D font) tag to the tag stack. Overrides default fonts for its duration.
Adds an $(D indent) tag to the tag stack. Multiplies level by current tabSize to determine new margin length.
Adds a $(D font) tag with a italics font to the tag stack. This is the same as adding a $(D i) tag if not currently in a $(D b) tag.
Adds a $(D list) tag to the tag stack. Similar to the BBCodes $(D ol) or $(D ul), but supports more list types. Not fully implemented!
Adds a $(D meta) tag to the tag stack. Similar to the BBCode $(D url=something){text}$(D /url), but supports non-String metadata types.
Adds a $(D font) tag with a monospace font to the tag stack.
Adds a $(D font) tag with a normal font to the tag stack.
Adds a $(D s) tag to the tag stack.
Adds a $(D table=columns) tag to the tag stack.
Adds a $(D u) tag to the tag stack.
Removes a line of content from the label. Returns true if the line exists. The line argument is the index of the line to remove, it can take values in the interval $(D 0, get_line_count() - 1).
Scrolls the window's top line to match line.
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. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. If expand is false, the column will not contribute to the total ratio.
If true, the label uses BBCode formatting. Note: Trying to alter the RichTextLabel's text with addText will reset this to false. Use instead appendBbcode to preserve BBCode formatting.
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. Note: It is unadvised to use the += operator with bbcode_text (e.g. bbcode_text += "some string") as it replaces the whole text and can cause slowdowns. Use appendBbcode for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
The currently installed custom effects. This is an array of RichTextEffects. To add a custom effect, it's more convenient to use installEffect.
If true, the label's height will be automatically updated to fit its content. Note: This property is used as a workaround to fix issues with RichTextLabel in Containers, but it's unreliable in some cases and will be removed in future versions.
If true, the label underlines meta tags such as $(D url){text}$(D /url).
If true, the label uses the custom font color.
The range of characters to display, as a double between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. Note: Setting this property updates visibleCharacters based on current getTotalCharacterCount.
If true, the scrollbar is visible. Setting this to false does not block scrolling completely. See scrollToLine.
If true, the window scrolls down to display new content automatically.
If true, the label allows text selection.
The number of spaces associated with a single tab length. Does not affect \t in text tags, only indent tags.
The raw text of the label. When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify bbcodeText.
The restricted number of characters to display in the label. If -1, all characters will be displayed. Note: Setting this property updates percentVisible based on current getTotalCharacterCount.
Construct a new instance of RichTextLabel. Note: use memnew!RichTextLabel instead.
Label that displays rich text.
Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. Note: Assignments to bbcodeText clear the tag stack and reconstruct it from the property's contents. Any edits made to bbcodeText will erase previous edits made from other manual sources such as appendBbcode and the push_* / pop methods. Note: RichTextLabel doesn't support entangled BBCode tags. For example, instead of using $(B bold$(D i)bold italic)italic$(D /i), use $(B bold$(D i)bold italic$(D /i))$(I italic). Note: Unlike Label, RichTextLabel doesn't have a property to horizontally align text to the center. Instead, enable bbcodeEnabled and surround the text in a $(D center) tag as follows: $(D center)Example$(D /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 fitContentHeight property.