WindowDialog

Inherits: Popup < Control < CanvasItem < Node < Object

Inherited By: AcceptDialog

窗口对话框的基类。

描述

Windowdialog是所有基于窗口的对话框的基类。它是一个默认的顶层Control控件,可以绘制一个窗口装饰,并允许移动和调整大小。

属性

bool

resizable

false

String

window_title

“”

方法

TextureButton

get_close_button ( )

主题属性

Color

title_color

Color( 0, 0, 0, 1 )

int

close_h_ofs

18

int

close_v_ofs

18

int

scaleborder_size

4

int

title_height

20

Font

title_font

Texture

close

Texture

close_highlight

StyleBox

panel

属性说明

Default

false

Setter

set_resizable(value)

Getter

get_resizable()

如果true,用户可以调整窗口大小。


Default

“”

Setter

set_title(value)

Getter

get_title()

显示在窗口标题栏的文字。

方法说明

返回关闭的 TextureButton

警告: 这是一个必需的内部节点,删除和释放它可能会导致崩溃。如果您希望隐藏它或其任何子项,请使用它们的 CanvasItem.visible 属性。

Theme Property Descriptions

Default

Color( 0, 0, 0, 1 )

标题文本的颜色。


  • int close_h_ofs

Default

18

关闭按钮的水平偏移。


  • int close_v_ofs

Default

18

关闭按钮的垂直偏移量。


  • int scaleborder_size

Default

4

缩放窗口时可以拖动的边框的粗细,如果启用了resizable


  • int title_height

Default

20

标题文本的垂直偏移。


用于绘制标题的字体。


关闭按钮的图标。


当用鼠标光标悬停时,关闭按钮使用的图标。


WindowDialog 和标题栏的内容背景的样式。标题栏使用 panel 样式盒创建,具有顶部边框和扩展边距。