Inherits: BaseButton < Control < CanvasItem < Node < Object
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.
focus_mode |
| |
| ||
mouse_default_cursor_shape |
| |
| ||
| ||
| ||
| ||
| ||
|
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
0
The LinkButton will always show an underline at the bottom of its text.
1
The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
2
The LinkButton will never show an underline at the bottom of its text.
""
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
0
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.
0
Base text writing direction.
0
The underline mode to use for the text. See UnderlineMode for the available modes.
""
The URI 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 OS.shell_open). HTTP and HTTPS URLs open the default web browser.
Examples:
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.C#
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.
Color(0.875, 0.875, 0.875, 1)
Default text Color of the LinkButton.
Color(0, 0, 0, 1)
Text Color used when the LinkButton is disabled.
Color(0.95, 0.95, 0.95, 1)
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.
Color(0.95, 0.95, 0.95, 1)
Text Color used when the LinkButton is being hovered.
Color(0, 0, 0, 1)
Text Color used when the LinkButton is being hovered and pressed.
Color(1, 1, 1, 1)
The tint of text outline of the LinkButton.
Color(1, 1, 1, 1)
Text Color used when the LinkButton is being pressed.
0
The size of the text outline.
Note: If using a font with FontFile.multichannel_signed_distance_field enabled, its FontFile.msdf_pixel_range must be set to at least twice the value of outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
2
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 focus StyleBox is displayed over 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.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_linkbutton.html