RichTextLabel

package
v0.0.0-...-7325ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package RichTextLabel provides methods for working with RichTextLabel object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsRichTextLabel() Instance
}

type HorizontalAlignment

type HorizontalAlignment int
const (
	/*Horizontal left alignment, usually for text-derived classes.*/
	HorizontalAlignmentLeft HorizontalAlignment = 0
	/*Horizontal center alignment, usually for text-derived classes.*/
	HorizontalAlignmentCenter HorizontalAlignment = 1
	/*Horizontal right alignment, usually for text-derived classes.*/
	HorizontalAlignmentRight HorizontalAlignment = 2
	/*Expand row to fit width, usually for text-derived classes.*/
	HorizontalAlignmentFill HorizontalAlignment = 3
)

type ImageUpdateMask

type ImageUpdateMask = gdclass.RichTextLabelImageUpdateMask //gd:RichTextLabel.ImageUpdateMask
const (
	/*If this bit is set, [method update_image] changes image texture.*/
	UpdateTexture ImageUpdateMask = 1
	/*If this bit is set, [method update_image] changes image size.*/
	UpdateSize ImageUpdateMask = 2
	/*If this bit is set, [method update_image] changes image color.*/
	UpdateColor ImageUpdateMask = 4
	/*If this bit is set, [method update_image] changes image inline alignment.*/
	UpdateAlignment ImageUpdateMask = 8
	/*If this bit is set, [method update_image] changes image texture region.*/
	UpdateRegion ImageUpdateMask = 16
	/*If this bit is set, [method update_image] changes image padding.*/
	UpdatePad ImageUpdateMask = 32
	/*If this bit is set, [method update_image] changes image tooltip.*/
	UpdateTooltip ImageUpdateMask = 64
	/*If this bit is set, [method update_image] changes image width from/to percents.*/
	UpdateWidthInPercent ImageUpdateMask = 128
)

type InlineAlignment

type InlineAlignment int
const (
	/*Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/
	InlineAlignmentTopTo InlineAlignment = 0
	/*Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/
	InlineAlignmentCenterTo InlineAlignment = 1
	/*Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/
	InlineAlignmentBaselineTo InlineAlignment = 3
	/*Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant.*/
	InlineAlignmentBottomTo InlineAlignment = 2
	/*Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text.*/
	InlineAlignmentToTop InlineAlignment = 0
	/*Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text.*/
	InlineAlignmentToCenter InlineAlignment = 4
	/*Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text.*/
	InlineAlignmentToBaseline InlineAlignment = 8
	/*Aligns inline object (e.g. image, table) to the bottom of the text.*/
	InlineAlignmentToBottom InlineAlignment = 12
	/*Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code].*/
	InlineAlignmentTop InlineAlignment = 0
	/*Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code].*/
	InlineAlignmentCenter InlineAlignment = 5
	/*Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code].*/
	InlineAlignmentBottom InlineAlignment = 14
	/*A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants.*/
	InlineAlignmentImageMask InlineAlignment = 3
	/*A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants.*/
	InlineAlignmentTextMask InlineAlignment = 12
)

type Instance

type Instance [1]gdclass.RichTextLabel

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. [b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods. [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code skip-lint][b]bold[i]bold italic[/b]italic[/i][/code], use [code skip-lint][b]bold[i]bold italic[/i][/b][i]italic[/i][/code]. [b]Note:[/b] [code]push_pop_*[/code] functions won't affect BBCode. [b]Note:[/b] Unlike [Label], [RichTextLabel] doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code skip-lint][center][/code] tag as follows: [code skip-lint][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content] property.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddImage

func (self Instance) AddImage(image [1]gdclass.Texture2D)

Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image. If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. If [param width] and [param height] are not set, but [param region] is, the region's rect will be used. [param key] is an optional identifier, that can be used to modify the image via [method update_image]. If [param pad] is set, and the image is smaller than the size specified by [param width] and [param height], the image padding is added to match the size instead of upscaling. If [param size_in_percent] is set, [param width] and [param height] values are percentages of the control width instead of pixels.

func (Instance) AddText

func (self Instance) AddText(text string)

Adds raw non-BBCode-parsed text to the tag stack.

func (Instance) AppendText

func (self Instance) AppendText(bbcode string)

Parses [param bbcode] and adds tags to the tag stack as needed. [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [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 [member text] instead of using [method append_text].

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsControl

func (self Instance) AsControl() Control.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRichTextLabel

func (self Instance) AsRichTextLabel() Instance

func (Instance) AutowrapMode

func (self Instance) AutowrapMode() gdclass.TextServerAutowrapMode

func (Instance) BbcodeEnabled

func (self Instance) BbcodeEnabled() bool

func (Instance) Clear

func (self Instance) Clear()

Clears the tag stack, causing the label to display nothing. [b]Note:[/b] This method does not affect [member text], and its contents will show again if the label is redrawn. However, setting [member text] to an empty [String] also clears the stack.

func (Instance) ContextMenuEnabled

func (self Instance) ContextMenuEnabled() bool

func (Instance) CustomEffects

func (self Instance) CustomEffects() []any

func (Instance) Deselect

func (self Instance) Deselect()

Clears the current selection.

func (Instance) DeselectOnFocusLossEnabled

func (self Instance) DeselectOnFocusLossEnabled() bool

func (Instance) DragAndDropSelectionEnabled

func (self Instance) DragAndDropSelectionEnabled() bool

func (Instance) FitContent

func (self Instance) FitContent() bool

func (Instance) GetCharacterLine

func (self Instance) GetCharacterLine(character int) int

Returns the line number of the character position provided. Line and character numbers are both zero-indexed. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetCharacterParagraph

func (self Instance) GetCharacterParagraph(character int) int

Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetContentHeight

func (self Instance) GetContentHeight() int

Returns the height of the content. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetContentWidth

func (self Instance) GetContentWidth() int

Returns the width of the content. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetLineCount

func (self Instance) GetLineCount() int

Returns the total number of lines in the text. Wrapped text is counted as multiple lines. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetLineOffset

func (self Instance) GetLineOffset(line int) Float.X

Returns the vertical offset of the line found at the provided index. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetMenu

func (self Instance) GetMenu() [1]gdclass.PopupMenu

Returns the [PopupMenu] of this [RichTextLabel]. By default, this menu is displayed when right-clicking on the [RichTextLabel]. You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example: [codeblocks] [gdscript] func _ready():

var menu = get_menu()
# Remove "Select All" item.
menu.remove_item(MENU_SELECT_ALL)
# Add custom items.
menu.add_separator()
menu.add_item("Duplicate Text", MENU_MAX + 1)
# Connect callback.
menu.id_pressed.connect(_on_item_pressed)

func _on_item_pressed(id):

if id == MENU_MAX + 1:
    add_text("\n" + get_parsed_text())

[/gdscript] [csharp] public override void _Ready()

{
    var menu = GetMenu();
    // Remove "Select All" item.
    menu.RemoveItem(RichTextLabel.MenuItems.SelectAll);
    // Add custom items.
    menu.AddSeparator();
    menu.AddItem("Duplicate Text", RichTextLabel.MenuItems.Max + 1);
    // Add event handler.
    menu.IdPressed += OnItemPressed;
}

public void OnItemPressed(int id)

{
    if (id == TextEdit.MenuItems.Max + 1)
    {
        AddText("\n" + GetParsedText());
    }
}

[/csharp] [/codeblocks] [b]Warning:[/b] 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 [member Window.visible] property.

func (Instance) GetParagraphCount

func (self Instance) GetParagraphCount() int

Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.

func (Instance) GetParagraphOffset

func (self Instance) GetParagraphOffset(paragraph int) Float.X

Returns the vertical offset of the paragraph found at the provided index. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetParsedText

func (self Instance) GetParsedText() string

Returns the text without BBCode mark-up.

func (Instance) GetSelectedText

func (self Instance) GetSelectedText() string

Returns the current selection text. Does not include BBCodes.

func (Instance) GetSelectionFrom

func (self Instance) GetSelectionFrom() int

Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.

func (Instance) GetSelectionTo

func (self Instance) GetSelectionTo() int

Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.

func (Instance) GetTotalCharacterCount

func (self Instance) GetTotalCharacterCount() int

Returns the total number of characters from text tags. Does not include BBCodes.

func (Instance) GetVScrollBar

func (self Instance) GetVScrollBar() [1]gdclass.VScrollBar

Returns the vertical scrollbar. [b]Warning:[/b] 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 [member CanvasItem.visible] property.

func (Instance) GetVisibleLineCount

func (self Instance) GetVisibleLineCount() int

Returns the number of visible lines. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) GetVisibleParagraphCount

func (self Instance) GetVisibleParagraphCount() int

Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.

func (Instance) HintUnderlined

func (self Instance) HintUnderlined() bool

func (Instance) InstallEffect

func (self Instance) InstallEffect(effect any)

Installs a custom effect. This can also be done in the RichTextLabel inspector using the [member custom_effects] property. [param effect] should be a valid [RichTextEffect]. Example RichTextEffect: [codeblock] # effect.gd class_name MyCustomEffect extends RichTextEffect

var bbcode = "my_custom_effect"

# ... [/codeblock] Registering the above effect in RichTextLabel from script: [codeblock] # rich_text_label.gd extends RichTextLabel

func _ready():

install_effect(MyCustomEffect.new())

# Alternatively, if not using `class_name` in the script that extends RichTextEffect:
install_effect(preload("res://effect.gd").new())

[/codeblock]

func (Instance) InvalidateParagraph

func (self Instance) InvalidateParagraph(paragraph int) bool

Invalidates [param paragraph] and all subsequent paragraphs cache.

func (Instance) IsMenuVisible

func (self Instance) IsMenuVisible() bool

Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).

func (Instance) IsReady

func (self Instance) IsReady() bool

If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code].

func (Instance) Language

func (self Instance) Language() string

func (Instance) MenuOption

func (self Instance) MenuOption(option int)

Executes a given action as defined in the [enum MenuItems] enum.

func (Instance) MetaUnderlined

func (self Instance) MetaUnderlined() bool

func (Instance) Newline

func (self Instance) Newline()

Adds a newline tag to the tag stack.

func (Instance) OnFinished

func (self Instance) OnFinished(cb func())

func (Instance) OnMetaClicked

func (self Instance) OnMetaClicked(cb func(meta any))

func (Instance) OnMetaHoverEnded

func (self Instance) OnMetaHoverEnded(cb func(meta any))

func (Instance) OnMetaHoverStarted

func (self Instance) OnMetaHoverStarted(cb func(meta any))

func (Instance) ParseBbcode

func (self Instance) ParseBbcode(bbcode string)

The assignment version of [method append_text]. Clears the tag stack and inserts the new content.

func (Instance) ParseExpressionsForValues

func (self Instance) ParseExpressionsForValues(expressions []string) map[string]interface{}

Parses BBCode parameter [param expressions] into a dictionary.

func (Instance) Pop

func (self Instance) Pop()

Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods.

func (Instance) PopAll

func (self Instance) PopAll()

Terminates all tags opened by [code]push_*[/code] methods.

func (Instance) PopContext

func (self Instance) PopContext()

Terminates tags opened after the last [method push_context] call (including context marker), or all tags if there's no context marker on the stack.

func (Instance) ProgressBarDelay

func (self Instance) ProgressBarDelay() int

func (Instance) PushBgcolor

func (self Instance) PushBgcolor(bgcolor Color.RGBA)

Adds a [code skip-lint][bgcolor][/code] tag to the tag stack.

func (Instance) PushBold

func (self Instance) PushBold()

Adds a [code skip-lint][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code skip-lint][b][/code] tag if not currently in a [code skip-lint][i][/code] tag.

func (Instance) PushBoldItalics

func (self Instance) PushBoldItalics()

Adds a [code skip-lint][font][/code] tag with a bold italics font to the tag stack.

func (Instance) PushCell

func (self Instance) PushCell()

Adds a [code skip-lint][cell][/code] tag to the tag stack. Must be inside a [code skip-lint][table][/code] tag. See [method push_table] for details. Use [method set_table_column_expand] to set column expansion ratio, [method set_cell_border_color] to set cell border, [method set_cell_row_background_color] to set cell background, [method set_cell_size_override] to override cell size, and [method set_cell_padding] to set padding.

func (Instance) PushColor

func (self Instance) PushColor(color Color.RGBA)

Adds a [code skip-lint][color][/code] tag to the tag stack.

func (Instance) PushContext

func (self Instance) PushContext()

Adds a context marker to the tag stack. See [method pop_context].

func (Instance) PushCustomfx

func (self Instance) PushCustomfx(effect [1]gdclass.RichTextEffect, env map[string]interface{})

Adds a custom effect tag to the tag stack. The effect does not need to be in [member custom_effects]. The environment is directly passed to the effect.

func (Instance) PushDropcap

func (self Instance) PushDropcap(s string, font [1]gdclass.Font, size int)

Adds a [code skip-lint][dropcap][/code] 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.

func (Instance) PushFgcolor

func (self Instance) PushFgcolor(fgcolor Color.RGBA)

Adds a [code skip-lint][fgcolor][/code] tag to the tag stack.

func (Instance) PushFont

func (self Instance) PushFont(font [1]gdclass.Font)

Adds a [code skip-lint][font][/code] tag to the tag stack. Overrides default fonts for its duration. Passing [code]0[/code] to [param font_size] will use the existing default font size.

func (Instance) PushFontSize

func (self Instance) PushFontSize(font_size int)

Adds a [code skip-lint][font_size][/code] tag to the tag stack. Overrides default font size for its duration.

func (Instance) PushHint

func (self Instance) PushHint(description string)

Adds a [code skip-lint][hint][/code] tag to the tag stack. Same as BBCode [code skip-lint][hint=something]{text}[/hint][/code].

func (Instance) PushIndent

func (self Instance) PushIndent(level int)

Adds an [code skip-lint][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.

func (Instance) PushItalics

func (self Instance) PushItalics()

Adds a [code skip-lint][font][/code] tag with an italics font to the tag stack. This is the same as adding an [code skip-lint][i][/code] tag if not currently in a [code skip-lint][b][/code] tag.

func (Instance) PushLanguage

func (self Instance) PushLanguage(language string)

Adds language code used for text shaping algorithm and Open-Type font features.

func (Instance) PushList

func (self Instance) PushList(level int, atype gdclass.RichTextLabelListType, capitalize bool)

Adds [code skip-lint][ol][/code] or [code skip-lint][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.

func (Instance) PushMeta

func (self Instance) PushMeta(data any)

Adds a meta tag to the tag stack. Similar to the BBCode [code skip-lint][url=something]{text}[/url][/code], but supports non-[String] metadata types. If [member meta_underlined] is [code]true[/code], meta tags display an underline. This behavior can be customized with [param underline_mode]. [b]Note:[/b] Meta tags do nothing by default when clicked. To assign behavior when clicked, connect [signal meta_clicked] to a function that is called when the meta tag is clicked.

func (Instance) PushMono

func (self Instance) PushMono()

Adds a [code skip-lint][font][/code] tag with a monospace font to the tag stack.

func (Instance) PushNormal

func (self Instance) PushNormal()

Adds a [code skip-lint][font][/code] tag with a normal font to the tag stack.

func (Instance) PushOutlineColor

func (self Instance) PushOutlineColor(color Color.RGBA)

Adds a [code skip-lint][outline_color][/code] tag to the tag stack. Adds text outline for its duration.

func (Instance) PushOutlineSize

func (self Instance) PushOutlineSize(outline_size int)

Adds a [code skip-lint][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.

func (Instance) PushParagraph

func (self Instance) PushParagraph(alignment HorizontalAlignment)

Adds a [code skip-lint][p][/code] tag to the tag stack.

func (Instance) PushStrikethrough

func (self Instance) PushStrikethrough()

Adds a [code skip-lint][s][/code] tag to the tag stack.

func (Instance) PushTable

func (self Instance) PushTable(columns int)

Adds a [code skip-lint][table=columns,inline_align][/code] tag to the tag stack. Use [method set_table_column_expand] to set column expansion ratio. Use [method push_cell] to add cells.

func (Instance) PushUnderline

func (self Instance) PushUnderline()

Adds a [code skip-lint][u][/code] tag to the tag stack.

func (Instance) RemoveParagraph

func (self Instance) RemoveParagraph(paragraph int) bool

Removes a paragraph of content from the label. Returns [code]true[/code] if the paragraph exists. The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval [code][0, get_paragraph_count() - 1][/code]. If [param no_invalidate] is set to [code]true[/code], cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and [method invalidate_paragraph] will be called at the end of operation.

func (Instance) ScrollActive

func (self Instance) ScrollActive() bool

func (Instance) ScrollFollowing

func (self Instance) ScrollFollowing() bool

func (Instance) ScrollToLine

func (self Instance) ScrollToLine(line int)

Scrolls the window's top line to match [param line].

func (Instance) ScrollToParagraph

func (self Instance) ScrollToParagraph(paragraph int)

Scrolls the window's top line to match first line of the [param paragraph].

func (Instance) ScrollToSelection

func (self Instance) ScrollToSelection()

Scrolls to the beginning of the current selection.

func (Instance) SelectAll

func (self Instance) SelectAll()

Select all the text. If [member selection_enabled] is [code]false[/code], no selection will occur.

func (Instance) SelectionEnabled

func (self Instance) SelectionEnabled() bool

func (Instance) SetAutowrapMode

func (self Instance) SetAutowrapMode(value gdclass.TextServerAutowrapMode)

func (Instance) SetBbcodeEnabled

func (self Instance) SetBbcodeEnabled(value bool)

func (Instance) SetCellBorderColor

func (self Instance) SetCellBorderColor(color Color.RGBA)

Sets color of a table cell border.

func (Instance) SetCellPadding

func (self Instance) SetCellPadding(padding Rect2.PositionSize)

Sets inner padding of a table cell.

func (Instance) SetCellRowBackgroundColor

func (self Instance) SetCellRowBackgroundColor(odd_row_bg Color.RGBA, even_row_bg Color.RGBA)

Sets color of a table cell. Separate colors for alternating rows can be specified.

func (Instance) SetCellSizeOverride

func (self Instance) SetCellSizeOverride(min_size Vector2.XY, max_size Vector2.XY)

Sets minimum and maximum size overrides for a table cell.

func (Instance) SetContextMenuEnabled

func (self Instance) SetContextMenuEnabled(value bool)

func (Instance) SetCustomEffects

func (self Instance) SetCustomEffects(value []any)

func (Instance) SetDeselectOnFocusLossEnabled

func (self Instance) SetDeselectOnFocusLossEnabled(value bool)

func (Instance) SetDragAndDropSelectionEnabled

func (self Instance) SetDragAndDropSelectionEnabled(value bool)

func (Instance) SetFitContent

func (self Instance) SetFitContent(value bool)

func (Instance) SetHintUnderlined

func (self Instance) SetHintUnderlined(value bool)

func (Instance) SetLanguage

func (self Instance) SetLanguage(value string)

func (Instance) SetMetaUnderlined

func (self Instance) SetMetaUnderlined(value bool)

func (Instance) SetProgressBarDelay

func (self Instance) SetProgressBarDelay(value int)

func (Instance) SetScrollActive

func (self Instance) SetScrollActive(value bool)

func (Instance) SetScrollFollowing

func (self Instance) SetScrollFollowing(value bool)

func (Instance) SetSelectionEnabled

func (self Instance) SetSelectionEnabled(value bool)

func (Instance) SetShortcutKeysEnabled

func (self Instance) SetShortcutKeysEnabled(value bool)

func (Instance) SetStructuredTextBidiOverride

func (self Instance) SetStructuredTextBidiOverride(value gdclass.TextServerStructuredTextParser)

func (Instance) SetStructuredTextBidiOverrideOptions

func (self Instance) SetStructuredTextBidiOverrideOptions(value []any)

func (Instance) SetTabSize

func (self Instance) SetTabSize(value int)

func (Instance) SetTableColumnExpand

func (self Instance) SetTableColumnExpand(column int, expand bool)

Edits the selected column's expansion options. If [param expand] is [code]true[/code], 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 [param expand] is [code]false[/code], the column will not contribute to the total ratio.

func (Instance) SetText

func (self Instance) SetText(value string)

func (Instance) SetTextDirection

func (self Instance) SetTextDirection(value gdclass.ControlTextDirection)

func (Instance) SetThreaded

func (self Instance) SetThreaded(value bool)

func (Instance) SetVisibleCharacters

func (self Instance) SetVisibleCharacters(value int)

func (Instance) SetVisibleCharactersBehavior

func (self Instance) SetVisibleCharactersBehavior(value gdclass.TextServerVisibleCharactersBehavior)

func (Instance) SetVisibleRatio

func (self Instance) SetVisibleRatio(value Float.X)

func (Instance) ShortcutKeysEnabled

func (self Instance) ShortcutKeysEnabled() bool

func (Instance) StructuredTextBidiOverride

func (self Instance) StructuredTextBidiOverride() gdclass.TextServerStructuredTextParser

func (Instance) StructuredTextBidiOverrideOptions

func (self Instance) StructuredTextBidiOverrideOptions() []any

func (Instance) TabSize

func (self Instance) TabSize() int

func (Instance) Text

func (self Instance) Text() string

func (Instance) TextDirection

func (self Instance) TextDirection() gdclass.ControlTextDirection

func (Instance) Threaded

func (self Instance) Threaded() bool

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UpdateImage

func (self Instance) UpdateImage(key any, mask gdclass.RichTextLabelImageUpdateMask, image [1]gdclass.Texture2D)

Updates the existing images with the key [param key]. Only properties specified by [param mask] bits are updated. See [method add_image].

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) VisibleCharacters

func (self Instance) VisibleCharacters() int

func (Instance) VisibleCharactersBehavior

func (self Instance) VisibleCharactersBehavior() gdclass.TextServerVisibleCharactersBehavior

func (Instance) VisibleRatio

func (self Instance) VisibleRatio() Float.X

type ListType

type ListType = gdclass.RichTextLabelListType //gd:RichTextLabel.ListType
const (
	/*Each list item has a number marker.*/
	ListNumbers ListType = 0
	/*Each list item has a letter marker.*/
	ListLetters ListType = 1
	/*Each list item has a roman number marker.*/
	ListRoman ListType = 2
	/*Each list item has a filled circle marker.*/
	ListDots ListType = 3
)
type MenuItems = gdclass.RichTextLabelMenuItems //gd:RichTextLabel.MenuItems
const (
	/*Copies the selected text.*/
	MenuCopy MenuItems = 0
	/*Selects the whole [RichTextLabel] text.*/
	MenuSelectAll MenuItems = 1
	/*Represents the size of the [enum MenuItems] enum.*/
	MenuMax MenuItems = 2
)

type MetaUnderline

type MetaUnderline = gdclass.RichTextLabelMetaUnderline //gd:RichTextLabel.MetaUnderline
const (
	/*Meta tag does not display an underline, even if [member meta_underlined] is [code]true[/code].*/
	MetaUnderlineNever MetaUnderline = 0
	/*If [member meta_underlined] is [code]true[/code], meta tag always display an underline.*/
	MetaUnderlineAlways MetaUnderline = 1
	/*If [member meta_underlined] is [code]true[/code], meta tag display an underline when the mouse cursor is over it.*/
	MetaUnderlineOnHover MetaUnderline = 2
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL