Table of Contents

Class LinkButton

Namespace
Godot
Assembly
GodotSharp.dll

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.

public class LinkButton : BaseButton, IDisposable
Inheritance
LinkButton
Implements
Inherited Members

Constructors

LinkButton()

public LinkButton()

Properties

Language

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

public string Language { get; set; }

Property Value

string

StructuredTextBidiOverride

Set BiDi algorithm override for the structured text.

public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }

Property Value

TextServer.StructuredTextParser

StructuredTextBidiOverrideOptions

Set additional options for BiDi override.

public Array StructuredTextBidiOverrideOptions { get; set; }

Property Value

Array

Text

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

public string Text { get; set; }

Property Value

string

TextDirection

Base text writing direction.

public Control.TextDirection TextDirection { get; set; }

Property Value

Control.TextDirection

Underline

The underline mode to use for the text. See LinkButton.UnderlineMode for the available modes.

public LinkButton.UnderlineMode Underline { get; set; }

Property Value

LinkButton.UnderlineMode

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 ShellOpen(string)). 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.
public string Uri { get; set; }

Property Value

string

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool