109 lines
3.2 KiB
GDScript
109 lines
3.2 KiB
GDScript
extends VBoxContainer
|
||
|
||
|
||
#用来标记当前进度的index,可能的取值为0,1,2,3,4,4为全部加载完成,-1为初始
|
||
@export var now_progress_index:int=-1:
|
||
set(value):
|
||
if now_progress_index!=value:
|
||
match value:
|
||
0:
|
||
%animation.play("RESET")
|
||
now_state_label=%progress_state_1
|
||
now_state_label.text="进行中"
|
||
%progress_state_2.text="未进行"
|
||
%progress_state_3.text="未进行"
|
||
%progress_name_4.text="未进行"
|
||
%ItemIcon1.texture=InProgressIcon
|
||
%ItemIcon2.texture=EllipseIconDis
|
||
%ItemIcon3.texture=EllipseIconDis
|
||
%ItemIcon4.texture=EllipseIconDis
|
||
%line1.texture=LineIconDis
|
||
%line2.texture=LineIconDis
|
||
%line3.texture=LineIconDis
|
||
%animation.play("item1_rotate")
|
||
1:
|
||
%animation.play("RESET")
|
||
now_state_label=%progress_state_1
|
||
now_state_label.text="已完成"
|
||
%progress_state_2.text="进行中"
|
||
%progress_state_3.text="未进行"
|
||
%progress_name_4.text="未进行"
|
||
%ItemIcon1.texture=EllipseIcon
|
||
%ItemIcon2.texture=InProgressIcon
|
||
%ItemIcon3.texture=EllipseIconDis
|
||
%ItemIcon4.texture=EllipseIconDis
|
||
%animation.play("item2_rotate")
|
||
%line1.texture=LineIconHigh
|
||
%line2.texture=LineIconDis
|
||
%line3.texture=LineIconDis
|
||
2:
|
||
%animation.play("RESET")
|
||
now_state_label=%progress_state_1
|
||
now_state_label.text="已完成"
|
||
%progress_state_2.text="已完成"
|
||
%progress_state_3.text="进行中"
|
||
%progress_name_4.text="未进行"
|
||
%ItemIcon1.texture=EllipseIcon
|
||
%ItemIcon2.texture=EllipseIcon
|
||
%ItemIcon3.texture=InProgressIcon
|
||
%ItemIcon4.texture=EllipseIconDis
|
||
%animation.play("item3_rotate")
|
||
%line1.texture=LineIconHigh
|
||
%line2.texture=LineIconHigh
|
||
%line3.texture=LineIconDis
|
||
3:
|
||
%animation.play("RESET")
|
||
now_state_label=%progress_state_1
|
||
now_state_label.text="已完成"
|
||
%progress_state_2.text="已完成"
|
||
%progress_state_3.text="已完成"
|
||
%progress_name_4.text="进行中"
|
||
%ItemIcon1.texture=EllipseIcon
|
||
%ItemIcon2.texture=EllipseIcon
|
||
%ItemIcon3.texture=EllipseIcon
|
||
%ItemIcon4.texture=InProgressIcon
|
||
%animation.play("item4_rotate")
|
||
%line1.texture=LineIconHigh
|
||
%line2.texture=LineIconHigh
|
||
%line3.texture=LineIconHigh
|
||
4:
|
||
%animation.play("RESET")
|
||
now_state_label=%progress_state_1
|
||
now_state_label.text="已完成"
|
||
%progress_state_2.text="已完成"
|
||
%progress_state_3.text="已完成"
|
||
%progress_name_4.text="已完成"
|
||
%ItemIcon1.texture=EllipseIcon
|
||
%ItemIcon2.texture=EllipseIcon
|
||
%ItemIcon3.texture=EllipseIcon
|
||
%ItemIcon4.texture=EllipseIcon
|
||
%line1.texture=LineIconHigh
|
||
%line2.texture=LineIconHigh
|
||
%line3.texture=LineIconHigh
|
||
now_progress_index=value
|
||
pass
|
||
|
||
#当前加载项的加载进度
|
||
@export var now_progress:int=0:
|
||
set(val):
|
||
if now_state_label!=null:
|
||
now_state_label.text="进行中 "+str(val)+"%"
|
||
|
||
@export var EllipseIcon:Texture2D
|
||
|
||
@export var EllipseIconDis:Texture2D
|
||
|
||
@export var InProgressIcon:Texture2D
|
||
|
||
@export var LineIconHigh:Texture2D
|
||
|
||
@export var LineIconDis:Texture2D
|
||
|
||
#当前进度的标签
|
||
@onready var now_state_label=%progress_state_1
|
||
|
||
|
||
|
||
|
||
|