A button that represents a link.
A button that represents a link. This type of button is primarily used for interactions that cause a context change (like linking to a web page).
See also [BaseButton] which contains common properties and methods associated with this node.
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
Set BiDi algorithm override for the structured text.
Set additional options for BiDi override.
The button's text that will be displayed inside the button's area.
Base text writing direction.
The underline mode to use for the text. See [enum LinkButton.UnderlineMode] for the available modes.
The [url=https://en.wikipedia.org/wiki/Uniform_Resource_Identifier]URI[/url] for this [LinkButton]. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via [method OS.shell_open]). HTTP and HTTPS URLs open the default web browser.
[b]Examples:[/b]
[codeblocks]
[gdscript]
uri = "https://godotengine.org" # Opens the URL in the default web browser.
uri = "C:\SomeFolder" # Opens the file explorer at the given path.
uri = "C:\SomeImage.png" # Opens the given image in the default viewing app.
[/gdscript]
[csharp]
Uri = "https://godotengine.org"; // Opens the URL in the default web browser.
Uri = "C:\SomeFolder"; // Opens the file explorer at the given path.
Uri = "C:\SomeImage.png"; // Opens the given image in the default viewing app.
[/csharp]
[/codeblocks]
The LinkButton will always show an underline at the bottom of its text.
The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
The LinkButton will never show an underline at the bottom of its text.
Default text [Color] of the [LinkButton].
Text [Color] used when the [LinkButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
Text [Color] used when the [LinkButton] is being hovered.
The tint of text outline of the [LinkButton].
Text [Color] used when the [LinkButton] is being pressed.
The size of the text outline.
[b]Note:[/b] If using a font with [member FontFile.multichannel_signed_distance_field] enabled, its [member FontFile.msdf_pixel_range] must be set to at least [i]twice[/i] the value of [theme_item outline_size] for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
The vertical space between the baseline of text and the underline.
[Font] of the [LinkButton]'s text.
Font size of the [LinkButton]'s text.
[StyleBox] used when the [LinkButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.