Skip to content

LinkButton

Inherits: BaseButton < Control < CanvasItem < Entity < 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.

Type Name Default
String ellipsis_char "…"
Control.FocusMode focus_mode 3 (overrides Control)
String language ""
Control.CursorShape mouse_default_cursor_shape 2 (overrides Control)
TextSystem.StructuredTextParser structured_text_bidi_override 0
Array structured_text_bidi_override_options []
String text ""
Control.TextDirection text_direction 0
TextSystem.OverrunBehavior text_overrun_behavior 0
UnderlineMode underline 0
String uri ""

UnderlineMode

enum UnderlineMode

UNDERLINE_MODE_ALWAYS = 0

The LinkButton will always show an underline at the bottom of its text.

UNDERLINE_MODE_ON_HOVER = 1

The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.

UNDERLINE_MODE_NEVER = 2

The LinkButton will never show an underline at the bottom of its text.

font_color

Color font_color (color) = Color(0.875, 0.875, 0.875, 1)

font_disabled_color

Color font_disabled_color (color) = Color(0, 0, 0, 1)

font_focus_color

Color font_focus_color (color) = Color(0.95, 0.95, 0.95, 1)

font_hover_color

Color font_hover_color (color) = Color(0.95, 0.95, 0.95, 1)

font_hover_pressed_color

Color font_hover_pressed_color (color) = Color(0, 0, 0, 1)

font_outline_color

Color font_outline_color (color) = Color(0, 0, 0, 1)

font_pressed_color

Color font_pressed_color (color) = Color(1, 1, 1, 1)

outline_size

int outline_size (constant) = 0

underline_spacing

int underline_spacing (constant) = 2

font

Font font (font)

font_size

int font_size (font_size)

focus

StyleBox focus (style)

ellipsis_char

String ellipsis_char = "…"

Ellipsis character used for text clipping.

language

String language = ""

Language code used for line-breaking and text shaping algorithms. If left empty, the current locale is used instead.

structured_text_bidi_override

TextSystem.StructuredTextParser structured_text_bidi_override = 0

Set BiDi algorithm override for the structured text.

structured_text_bidi_override_options

Array structured_text_bidi_override_options = []

Set additional options for BiDi override.

text

String text = ""

The button’s text that will be displayed inside the button’s area.

text_direction

Control.TextDirection text_direction = 0

Base text writing direction.

text_overrun_behavior

TextSystem.OverrunBehavior text_overrun_behavior = 0

Sets the clipping behavior when the text exceeds the node’s bounding rectangle.

underline

UnderlineMode underline = 0

The underline mode to use for the text.

uri

String 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.

Uri = "https://orblitengine.com"; // 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.