跳转至

TextureProgress

继承

Range

简要描述

基于纹理的进度条。对于加载屏幕和生命或耐力条很有用。

描述

TextureProgress的工作方式类似于ProgressBar,但是最多使用3个纹理而不是IdeaVR的Theme资源。

成员

类型 属性名 默认值
int fill_mode 0
int mouse_filter 1
bool nine_patch_stretch false
Vector2 radial_center_offset Vector2( 0, 0 )
float radial_fill_degrees 360.0
float radial_initial_angle 0.0
int stretch_margin_bottom 0
int stretch_margin_left 0
int stretch_margin_right 0
int stretch_margin_top 0
Texture texture_over
Texture texture_progress
Texture texture_under
Color tint_over Color( 1, 1, 1, 1 )
Color tint_progress Color( 1, 1, 1, 1 )
Color tint_under Color( 1, 1, 1, 1 )

方法

返回值类型 方法名称
int get_stretch_margin(margin: int) const
void set_stretch_margin(margin: int, value: int)
##枚举
enum FillMode:
- FILL_LEFT_TO_RIGHT = 0

texture_progress从左到右填充。

  • FILL_RIGHT_TO_LEFT = 1

[成员texture_progress]从右到左填充。

  • FILL_TOP_TO_BOTTOM = 2

[成员texture_progress]从上到下填充。

  • FILL_BOTTOM_TO_TOP = 3

[成员texture_progress]从下到上填充。

  • FILL_CLOCKWISE = 4

将节点变成径向条。

  • FILL_COUNTER_CLOCKWISE = 5

将节点变成径向条。

  • FILL_BILINEAR_LEFT_AND_RIGHT = 6

texture_progress从中心填充,向左和向右扩展。

  • FILL_BILINEAR_TOP_AND_BOTTOM = 7

texture_progress从中心填充,同时向顶部和底部扩展。

  • FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE = 8

将节点变成径向条。texture_progress从中心径向填充,顺时针和逆时针扩展。 请参照radial_center_offsetradial_initial_angleradial_fill_degrees,来控制条的填充方式。


常量

成员说明

  • int fill_mode
Default 0
setter set_fill_mode(value)
getter get_fill_mode
  • int mouse_filter
Default 1
setter set_mouse_filter(value)
getter get_mouse_filter
  • bool nine_patch_stretch
Default false
setter set_nine_patch_stretch(value)
getter get_nine_patch_stretch
  • Vector2 radial_center_offset
Default Vector2( 0, 0 )
setter set_radial_center_offset(value)
getter get_radial_center_offset
  • float radial_fill_degrees
Default 360.0
setter set_fill_degrees(value)
getter get_fill_degrees
  • float radial_initial_angle
Default 0.0
setter set_radial_initial_angle(value)
getter get_radial_initial_angle
  • int stretch_margin_bottom
Default 0
setter set_stretch_margin(value)
getter get_stretch_margin
  • int stretch_margin_left
Default 0
setter set_stretch_margin(value)
getter get_stretch_margin
  • int stretch_margin_right
Default 0
setter set_stretch_margin(value)
getter get_stretch_margin
  • int stretch_margin_top
Default 0
setter set_stretch_margin(value)
getter get_stretch_margin
  • Texture texture_over
setter set_over_texture(value)
getter get_over_texture
  • Texture texture_progress
setter set_progress_texture(value)
getter get_progress_texture
  • Texture texture_under
setter set_under_texture(value)
getter get_under_texture
  • Color tint_over
Default Color( 1, 1, 1, 1 )
setter set_tint_over(value)
getter get_tint_over
  • Color tint_progress
Default Color( 1, 1, 1, 1 )
setter set_tint_progress(value)
getter get_tint_progress
  • Color tint_under
Default Color( 1, 1, 1, 1 )
setter set_tint_under(value)
getter get_tint_under

方法说明

  • get_stretch_margin get_stretch_margin(margin: int) const

  • set_stretch_margin set_stretch_margin(margin: int, value: int)