Class LinkButton
A button that represents a link.
- Inheritance
-
LinkButton
Remarks
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.
Properties
language
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
var language : String = ""
Property Value
Remarks
structured_text_bidi_override
Set BiDi algorithm override for the structured text.
var structured_text_bidi_override : int = 0
Property Value
Remarks
structured_text_bidi_override_options
Set additional options for BiDi override.
var structured_text_bidi_override_options : Array = []
Property Value
Remarks
text
The button's text that will be displayed inside the button's area.
var text : String = ""
Property Value
Remarks
text_direction
Base text writing direction.
var text_direction : int = 0
Property Value
Remarks
underline
The underline mode to use for the text. See UnderlineMode for the available modes.
var underline : int = 0
Property Value
Remarks
uri
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.
var uri : String = ""
Property Value
Remarks
font_color
Theme Property
Default text Color of the LinkButton.
= ``Color(0.875, 0.875, 0.875, 1)``
Property Value
font_disabled_color
Theme Property
Text Color used when the LinkButton is disabled.
= ``Color(0, 0, 0, 1)``
Property Value
font_focus_color
Theme Property
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)``
Property Value
font_hover_color
Theme Property
Text Color used when the LinkButton is being hovered.
= ``Color(0.95, 0.95, 0.95, 1)``
Property Value
font_hover_pressed_color
Theme Property
Text Color used when the LinkButton is being hovered and pressed.
= ``Color(0, 0, 0, 1)``
Property Value
font_outline_color
Theme Property
The tint of text outline of the LinkButton.
= ``Color(0, 0, 0, 1)``
Property Value
font_pressed_color
Theme Property
Text Color used when the LinkButton is being pressed.
= ``Color(1, 1, 1, 1)``
Property Value
outline_size
Theme Property
The size of the text outline.
Note: If using a font with multichannel_signed_distance_field enabled, its 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.
= ``0``
Property Value
underline_spacing
Theme Property
The vertical space between the baseline of text and the underline.
= ``2``
Property Value
font
Theme Property
Font of the LinkButton's text.
Font font
Property Value
font_size
Theme Property
Font size of the LinkButton's text.
int font_size
Property Value
focus
Theme Property
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.
StyleBox focus