Skip to content

Commit

Permalink
add test for issue #43
Browse files Browse the repository at this point in the history
  • Loading branch information
ceceppa committed Aug 30, 2024
1 parent 5f490c9 commit 9ab119b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 22 deletions.
2 changes: 1 addition & 1 deletion TestScene/AnimatedControl.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://bxxkjttcw57ae"]

[ext_resource type="Script" path="res://TestScene/AnimatedControl.gd" id="1_242tf"]
[ext_resource type="Texture2D" uid="uid://cu23cv5pjsa0t" path="res://addons/anima/resources/anima-preview.png" id="2_ftiaj"]
[ext_resource type="Texture2D" uid="uid://ca72ljjcye5v1" path="res://addons/anima/resources/anima-preview.png" id="2_ftiaj"]
[ext_resource type="Script" path="res://addons/anima/components/AnimatedControl.gd" id="2_y0l0h"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ry2r1"]
Expand Down
6 changes: 3 additions & 3 deletions addons/anima/animations/zooming_exits/zoom_out_right.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ var KEYFRAMES := {
40: {
opacity = 1,
scale = Vector3(0.475, 0.475, 0.475),
"translate:x": 42,
"translate:x" = 42,
},
to = {
"to": {
opacity = 0,
scale = Vector3(0.1, 0.1, 0.1),
"translate:x": ":size:x",
"translate:x" = ":size:x",
}
}
24 changes: 12 additions & 12 deletions addons/anima/ui/AnimationPicker/AnimationPicker.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ext_resource type="Script" path="res://addons/anima/ui/AnimationPicker/AnimationPicker.gd" id="1_cyqje"]
[ext_resource type="PackedScene" uid="uid://hrxmgulob80r" path="res://addons/anima/ui/AnimationPicker/CTAPrimaryButton.tscn" id="2_6r4ts"]
[ext_resource type="Texture2D" uid="uid://cu23cv5pjsa0t" path="res://addons/anima/resources/anima-preview.png" id="2_pk6n6"]
[ext_resource type="Texture2D" uid="uid://ca72ljjcye5v1" path="res://addons/anima/resources/anima-preview.png" id="2_pk6n6"]
[ext_resource type="PackedScene" uid="uid://0luo7c2dwb4l" path="res://addons/anima/ui/AnimationPicker/CTASecondaryButton.tscn" id="3_qvnfb"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0ikkc"]
Expand Down Expand Up @@ -219,20 +219,20 @@ auto_brace_completion_highlight_matching = true
[connection signal="item_rect_changed" from="." to="." method="_on_item_rect_changed"]
[connection signal="text_submitted" from="TabContainer/Animations/Control/Panel/MarginContainer/HBoxContainer/AnimationSpeed" to="." method="_on_animation_speed_text_submitted"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/HeaderButton" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/HeaderButton" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18597" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18597" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18607" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18607" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18585" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18585" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18595" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18595" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18605" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18605" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18617" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18617" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18629" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18629" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18641" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18641" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18671" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18671" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18699" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18699" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18659" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18659" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18687" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18687" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18697" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18697" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18709" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18709" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18721" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18721" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18733" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18733" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18743" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18743" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18753" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18753" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18763" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18763" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18767" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18767" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18787" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18787" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18731" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18731" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18741" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18741" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18751" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18751" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18755" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18755" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18775" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18775" method="_on_toggled"]
[connection signal="pressed" from="TabContainer/Animations/VBoxContainer/MarginContainer/HBoxContainer/UseAnimation" to="." method="_on_use_animation_pressed"]
[connection signal="pressed" from="TabContainer/Animations/VBoxContainer/MarginContainer/HBoxContainer/CloseButton" to="." method="_on_close_button_pressed"]
65 changes: 59 additions & 6 deletions tests/Test.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,63 @@
[gd_scene format=3 uid="uid://b2teliumq3djx"]
[gd_scene load_steps=2 format=3 uid="uid://b2teliumq3djx"]

[ext_resource type="Script" path="res://tests/test.gd" id="1_gsa5s"]

[node name="Test" type="Control"]
layout_mode = 3
anchors_preset = 0
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_gsa5s")

[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Button" type="Button" parent="VBoxContainer"]
layout_mode = 2
text = "Play animation"

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 48
alignment = 1

[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Label 1"

[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Label 2"
metadata/__anima_initial_state__ = {
"position:y": {
"_initial_value": 295.0,
"key": "y",
"property": "position"
},
"scale:y": {
"_initial_value": 1.0,
"is_rect2": false,
"key": "y",
"property": "scale"
}
}
metadata/__anima_visibility_strategy = 0
metadata/__anima_initial_relative_value_position_y = 295.0
metadata/__anima_last_relative_value_position_y = 295.0
metadata/__anima_pivot_applied = true
metadata/_visibility_strategy_reverted = true

[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Label 3"

[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_right = 40.0
offset_bottom = 23.0
[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"]

0 comments on commit 9ab119b

Please sign in to comment.