主题¶
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_theme ( Theme other ) |
get_color_list ( String type ) const |
|
get_constant ( String name, String type ) const |
|
get_constant_list ( String type ) const |
|
get_font_list ( String type ) const |
|
get_icon_list ( String type ) const |
|
get_stylebox ( String name, String type ) const |
|
get_stylebox_list ( String type ) const |
|
get_stylebox_types ( ) const |
|
get_type_list ( String type ) const |
|
has_constant ( String name, String type ) const |
|
has_stylebox ( String name, String type ) const |
|
无效 |
|
无效 |
set_constant ( String name, String type, int constant ) |
无效 |
|
无效 |
|
无效 |
set_stylebox ( String name, String type, StyleBox texture ) |
描述¶
用于剥皮控件的主题。控件可以单独剥皮,但对于复杂的应用程序,只创建定义所有内容的全局主题更为实际。此主题可应用于任何 Control ;控件及其子控件将自动使用它。
主题资源也可以通过在 .theme
文件,有关详细信息,请参阅文档。
方法说明¶
void clear ( )
清除 Color 在 name
如果主题有 type
.
清除常量at name
如果主题有 type
.
清除 Font 在 name
如果主题有 type
.
清除位于的图标 name
如果主题有 type
.
清除 StyleBox 在 name
如果主题有 type
.
void copy_default_theme ( )
将主题值设置为默认主题值的副本。
void copy_theme ( Theme other )
返回 Color 在 name
如果主题有 type
.
PoolStringArray get_color_list ( String type ) const
返回所有 Color 作为一个 PoolStringArray 每个填充 Color 的名称,用于 get_color ,如果主题有 type
.
返回常量at name
如果主题有 type
.
PoolStringArray get_constant_list ( String type ) const
返回所有常量作为 PoolStringArray 用每个常量的名称填充,用于 get_constant ,如果主题有 type
.
返回 Font 在 name
如果主题有 type
.
PoolStringArray get_font_list ( String type ) const
返回所有 Font 作为一个 PoolStringArray 每个填充 Font 的名称,用于 get_font ,如果主题有 type
.
返回图标 Texture 在 name
如果主题有 type
.
PoolStringArray get_icon_list ( String type ) const
将所有图标作为 PoolStringArray 每个填充 Texture 的名称,用于 get_icon ,如果主题有 type
.
返回图标 StyleBox 在 name
如果主题有 type
.
PoolStringArray get_stylebox_list ( String type ) const
返回所有 StyleBox 作为一个 PoolStringArray 每个填充 StyleBox 的名称,用于 get_stylebox ,如果主题有 type
.
PoolStringArray get_stylebox_types ( ) const
返回所有 StyleBox 类型为 PoolStringArray 每个填充 StyleBox 的类型,用于 get_stylebox 和/或 get_stylebox_list ,如果主题有 type
.
PoolStringArray get_type_list ( String type ) const
返回中的所有类型 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
.
设置主题的 Color 到 color
在 name
在里面 type
.
如果主题没有 type
.
将主题的常量设置为 constant
在 name
在里面 type
.
如果主题没有 type
.
设置主题的 Font 到 font
在 name
在里面 type
.
如果主题没有 type
.
设置主题的图标 Texture 到 texture
在 name
在里面 type
.
如果主题没有 type
.
设置主题 StyleBox 到 stylebox
在 name
在里面 type
.
如果主题没有 type
.