frame-of-mind/src/ui/loading/loading.tscn

77 lines
2.3 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=8 format=3 uid="uid://d38f0a333kki1"]
[ext_resource type="Texture2D" uid="uid://d031kxe5m4ihh" path="res://import/interface-elements/loading_rect_clip.png" id="1_dbd3p"]
[ext_resource type="Texture2D" uid="uid://bqf82f8dk4yun" path="res://import/interface-elements/loading_rect_frame.png" id="2_6oitr"]
[ext_resource type="Texture2D" uid="uid://dpftqdvtrkioh" path="res://import/interface-elements/loading_rect_deco.png" id="3_jqdbn"]
[ext_resource type="Animation" uid="uid://bmfwcyr136isp" path="res://ui/loading/anim_loading_done.tres" id="5_aeyqy"]
[ext_resource type="Animation" uid="uid://duec6i017lil8" path="res://ui/loading/anim_loading_game.tres" id="6_s70xq"]
[sub_resource type="GDScript" id="GDScript_cegan"]
script/source = "extends Label
@export var animation_speed: float = 0.2
var _base_text: String
func _ready() -> void:
_base_text = text
var _accumulate_delta: float = 0
var _frame: int = 0
func _process(delta: float) -> void:
_accumulate_delta += delta
if _accumulate_delta > animation_speed:
_frame += 1
_accumulate_delta = fmod(_accumulate_delta, animation_speed)
var dots: String
match _frame % 4:
1: dots = \".\"
2: dots = \"..\"
3: dots = \"...\"
_: dots = \"\"
text = \"%s %s\" % [TranslationServer.translate(_base_text), dots]
"
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jqdbn"]
_data = {
&"anim_loading_done": ExtResource("5_aeyqy"),
&"anim_loading_game": ExtResource("6_s70xq")
}
[node name="Loading" type="Control"]
layout_mode = 3
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
grow_vertical = 0
[node name="mask" type="Sprite2D" parent="."]
modulate = Color(1, 1, 1, 0)
clip_children = 1
position = Vector2(101.4607, -58.539307)
texture = ExtResource("1_dbd3p")
[node name="frame" type="Sprite2D" parent="mask"]
texture = ExtResource("2_6oitr")
[node name="deco" type="Sprite2D" parent="mask/frame"]
modulate = Color(1, 1, 1, 0)
rotation = -0.261799
texture = ExtResource("3_jqdbn")
[node name="LoadingLabel" type="Label" parent="."]
layout_mode = 0
offset_left = 170.0
offset_top = -37.0
offset_right = 310.00003
offset_bottom = 9.0
text = "loading"
script = SubResource("GDScript_cegan")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"LoadingSpinner": SubResource("AnimationLibrary_jqdbn")
}
autoplay = "init"