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.

ReferenceRect

繼承: Control < CanvasItem < Node < Object

A rectangular box for designing UIs.

說明

A rectangular box that displays only a colored border around its rectangle (see Control.get_rect()). It can be used to visualize the extents of a Control node, for testing purposes.

屬性

Color

border_color

Color(1, 0, 0, 1)

float

border_width

1.0

bool

editor_only

true


屬性說明

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

  • void set_border_color(value: Color)

  • Color get_border_color()

設定該 ReferenceRect 的邊框顏色。


float border_width = 1.0 🔗

  • void set_border_width(value: float)

  • float get_border_width()

設定該 ReferenceRect 的邊框寬度。邊界相對於矩形框同時向內向外伸長。


bool editor_only = true 🔗

  • void set_editor_only(value: bool)

  • bool get_editor_only()

如果為 true,則 ReferenceRect 僅在編輯器中可見。否則,ReferenceRect 將在正在運作的專案中可見。