主题

Inherits: Resource < Reference < Object

类别: 核心

简要说明

控件的主题。

方法

无效

clear ( )

无效

clear_color ( String name, String type )

无效

clear_constant ( String name, String type )

无效

clear_font ( String name, String type )

无效

clear_icon ( String name, String type )

无效

clear_stylebox ( String name, String type )

无效

copy_default_theme ( )

无效

copy_theme ( Theme other )

Color

get_color ( String name, String type ) const

PoolStringArray

get_color_list ( String type ) const

int

get_constant ( String name, String type ) const

PoolStringArray

get_constant_list ( String type ) const

Font

get_font ( String name, String type ) const

PoolStringArray

get_font_list ( String type ) const

Texture

get_icon ( String name, String type ) const

PoolStringArray

get_icon_list ( String type ) const

StyleBox

get_stylebox ( String name, String type ) const

PoolStringArray

get_stylebox_list ( String type ) const

PoolStringArray

get_stylebox_types ( ) const

PoolStringArray

get_type_list ( String type ) const

bool

has_color ( String name, String type ) const

bool

has_constant ( String name, String type ) const

bool

has_font ( String name, String type ) const

bool

has_icon ( String name, String type ) const

bool

has_stylebox ( String name, String type ) const

无效

set_color ( String name, String type, Color color )

无效

set_constant ( String name, String type, int constant )

无效

set_font ( String name, String type, Font font )

无效

set_icon ( String name, String type, Texture texture )

无效

set_stylebox ( String name, String type, StyleBox texture )

描述

用于剥皮控件的主题。控件可以单独剥皮,但对于复杂的应用程序,只创建定义所有内容的全局主题更为实际。此主题可应用于任何 Control ;控件及其子控件将自动使用它。

主题资源也可以通过在 .theme 文件,有关详细信息,请参阅文档。

教程

属性描述

设定器

设置默认字体(值)

吸气剂

获取默认字体()

主题的默认字体。

方法说明

  • void clear ( )

清除 Colorname 如果主题有 type .

清除常量at name 如果主题有 type .

清除 Fontname 如果主题有 type .

清除位于的图标 name 如果主题有 type .

清除 StyleBoxname 如果主题有 type .

  • void copy_default_theme ( )

将主题值设置为默认主题值的副本。

  • void copy_theme ( Theme other )

返回 Colorname 如果主题有 type .

返回所有 Color 作为一个 PoolStringArray 每个填充 Color 的名称,用于 get_color ,如果主题有 type .

返回常量at name 如果主题有 type .

返回所有常量作为 PoolStringArray 用每个常量的名称填充,用于 get_constant ,如果主题有 type .

返回 Fontname 如果主题有 type .

返回所有 Font 作为一个 PoolStringArray 每个填充 Font 的名称,用于 get_font ,如果主题有 type .

返回图标 Texturename 如果主题有 type .

将所有图标作为 PoolStringArray 每个填充 Texture 的名称,用于 get_icon ,如果主题有 type .

返回图标 StyleBoxname 如果主题有 type .

返回所有 StyleBox 作为一个 PoolStringArray 每个填充 StyleBox 的名称,用于 get_stylebox ,如果主题有 type .

返回所有 StyleBox 类型为 PoolStringArray 每个填充 StyleBox 的类型,用于 get_stylebox 和/或 get_stylebox_list ,如果主题有 type .

返回中的所有类型 type 作为一个 PoolStringArray 用于任何GET_ * 功能,如果主题 type .

返回 true 如果 Color 具有 name 是在 type .

返回 false 如果主题没有 type .

返回 true 如果常量为 name 是在 type .

返回 false 如果主题没有 type .

返回 true 如果 Font 具有 name 是在 type .

返回 false 如果主题没有 type .

返回 true if图标 Texture 具有 name 是在 type .

返回 false 如果主题没有 type .

返回 true 如果 StyleBox 具有 name 是在 type .

返回 false 如果主题没有 type .

设置主题的 Colorcolorname 在里面 type .

如果主题没有 type .

将主题的常量设置为 constantname 在里面 type .

如果主题没有 type .

设置主题的 Fontfontname 在里面 type .

如果主题没有 type .

设置主题的图标 Texturetexturename 在里面 type .

如果主题没有 type .

设置主题 StyleBoxstyleboxname 在里面 type .

如果主题没有 type .