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

91 lines
2.8 KiB
Plaintext

[gd_scene load_steps=9 format=3 uid="uid://d38f0a333kki1"]
[ext_resource type="Script" uid="uid://dc46me7xd5pbc" path="res://ui/loading/loading.gd" id="1_aeyqy"]
[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
offset_top = -80.16669
offset_right = 500.0
offset_bottom = 0.00036621094
grow_vertical = 0
script = ExtResource("1_aeyqy")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = 100
[node name="mask" type="Sprite2D" parent="CanvasLayer"]
modulate = Color(1, 1, 1, 0)
clip_children = 1
position = Vector2(73.00001, 980.00006)
scale = Vector2(0.99999994, 0.99999994)
texture = ExtResource("1_dbd3p")
[node name="frame" type="Sprite2D" parent="CanvasLayer/mask"]
texture = ExtResource("2_6oitr")
[node name="deco" type="Sprite2D" parent="CanvasLayer/mask/frame"]
modulate = Color(1, 1, 1, 0)
rotation = -0.261799
texture = ExtResource("3_jqdbn")
[node name="LoadingLabel" type="Label" parent="CanvasLayer"]
unique_name_in_owner = true
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -38.16626
offset_right = 89.0
offset_bottom = 0.00036621094
grow_vertical = 0
text = "loading"
vertical_alignment = 2
script = SubResource("GDScript_cegan")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"LoadingSpinner": SubResource("AnimationLibrary_jqdbn")
}
autoplay = "init"