Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
LinkButton¶
Inherits: BaseButton < Control < CanvasItem < Node < Object
代表链接的按钮。
Description¶
代表链接的按钮。这种按钮主要用于与按钮的交互引起上下文变化时(如链接到网页)。
另见 BaseButton,它包含了该节点相关的常用属性和方法。
Properties¶
focus_mode |
|
|
|
||
mouse_default_cursor_shape |
|
|
|
||
|
||
|
||
|
||
|
||
|
Theme Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Enumerations¶
enum UnderlineMode:
UnderlineMode UNDERLINE_MODE_ALWAYS = 0
LinkButton 将始终在其文本底部显示下划线。
UnderlineMode UNDERLINE_MODE_ON_HOVER = 1
LinkButton 将在鼠标光标悬停时,在文本底部显示下划线。
UnderlineMode UNDERLINE_MODE_NEVER = 2
LinkButton 永远不会在其文本底部显示下划线。
Property Descriptions¶
String language = ""
语言代码,用于断行和文本塑形算法,如果留空则使用当前区域设置。
StructuredTextParser structured_text_bidi_override = 0
void set_structured_text_bidi_override ( StructuredTextParser value )
StructuredTextParser get_structured_text_bidi_override ( )
为结构化文本设置 BiDi 算法覆盖。
Array structured_text_bidi_override_options = []
void set_structured_text_bidi_override_options ( Array value )
Array get_structured_text_bidi_override_options ( )
设置 BiDi 覆盖的附加选项。
String text = ""
该按钮的文本,将显示在按钮的区域内。
TextDirection text_direction = 0
void set_text_direction ( TextDirection value )
TextDirection get_text_direction ( )
基础文本书写方向。
UnderlineMode underline = 0
void set_underline_mode ( UnderlineMode value )
UnderlineMode get_underline_mode ( )
文本的下划线模式。可用模式见 UnderlineMode。
String uri = ""
这个 LinkButton 的 URI。如果设置为有效的 URI,按下按钮就会使用操作系统中与该协议对应的默认程序打开该 URI(使用 OS.shell_open)。HTTP 和 HTTPS 的 URL 会打开默认的浏览器。
示例:
uri = "https://godotengine.org" # 在默认浏览器中打开 URL。
uri = "C:\SomeFolder" # 将文件浏览器打开到给定的路径。
uri = "C:\SomeImage.png" # 在默认查看应用中打开给定的图像。
Uri = "https://godotengine.org"; // 在默认