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.

StyleBoxLine

繼承: StyleBox < Resource < RefCounted < Object

顯示一條線的 StyleBox,可以給定顏色和粗細。

說明

顯示一條線的 StyleBox,可以給定顏色和粗細。可以是橫線也可以是分隔號。可用作分隔符。

屬性

Color

color

Color(0, 0, 0, 1)

float

grow_begin

1.0

float

grow_end

1.0

int

thickness

1

bool

vertical

false


屬性說明

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

線的顏色。


float grow_begin = 1.0 🔗

  • void set_grow_begin(value: float)

  • float get_grow_begin()

線將在 StyleBoxLine 的邊界之前延伸的圖元數。如果設定為負值,則該線將從 StyleBoxLine 的邊界內開始。


float grow_end = 1.0 🔗

  • void set_grow_end(value: float)

  • float get_grow_end()

線將超出 StyleBoxLine 邊界的圖元數。如果設定為負值,則該線將在 StyleBoxLine 的邊界內結束。


int thickness = 1 🔗

  • void set_thickness(value: int)

  • int get_thickness()

線條的粗細(以圖元為單位)。


bool vertical = false 🔗

  • void set_vertical(value: bool)

  • bool is_vertical()

如果為 true,則該線將是垂直的。如果 false,該線將是水平的。