Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added addons/godot_card_layout.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
class_name GCardHandLayout
extends Control

## Emits when cards layout animation finished
signal layout_animation_finished()
## Emits when a card is hovered.
signal card_hoverd(card:Control, index:int)
## Emits when all the cards are unhovered.
Expand Down Expand Up @@ -167,6 +169,8 @@ func _reset_positions(reculculate_curve:bool = false, animated:bool = true):
position_index += 1
if should_animate:
_reset_position_tween.play()
await _reset_position_tween.finished
layout_animation_finished.emit()

func _setup_cards():
for child in get_children():
Expand Down
21 changes: 9 additions & 12 deletions example/hand_layout_example.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,38 @@ offset_top = 182.0
offset_right = 321.0
offset_bottom = 222.0
script = ExtResource("1_u2yyo")
hovered_index = 1

[node name="GCard2" parent="GCardHandLayout" instance=ExtResource("2_hudwu")]
layout_mode = 0
offset_left = -118.217
offset_left = -78.2172
offset_top = 6.15582
offset_right = -38.2203
offset_right = 1.77947
offset_bottom = 118.156
rotation = -0.15708

[node name="GCard3" parent="GCardHandLayout" instance=ExtResource("2_hudwu")]
layout_mode = 0
offset_left = -39.2295
offset_top = -18.4587
offset_top = 1.54132
offset_right = 40.7764
offset_bottom = 93.541
scale = Vector2(1.1, 1.1)
offset_bottom = 113.541
rotation = -0.0785398

[node name="GCard4" parent="GCardHandLayout" instance=ExtResource("2_hudwu")]
layout_mode = 0
offset_left = 40.0
offset_right = 120.0

[node name="GCard5" parent="GCardHandLayout" instance=ExtResource("2_hudwu")]
layout_mode = 0
offset_left = 79.2296
offset_left = 39.2295
offset_top = 1.54132
offset_right = 159.23
offset_right = 119.23
offset_bottom = 113.541
rotation = 0.0785398

[node name="GCard6" parent="GCardHandLayout" instance=ExtResource("2_hudwu")]
layout_mode = 0
offset_left = 118.217
offset_left = 78.2172
offset_top = 6.15582
offset_right = 198.217
offset_right = 158.217
offset_bottom = 118.156
rotation = 0.15708
2 changes: 1 addition & 1 deletion project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ window/stretch/mode="canvas_items"

[editor_plugins]

enabled=PackedStringArray("res://addons/Todo_Manager/plugin.cfg", "res://addons/godot_card_layout/plugin.cfg", "res://addons/gut/plugin.cfg")
enabled=PackedStringArray("res://addons/godot_card_layout/plugin.cfg", "res://addons/gut/plugin.cfg")
34 changes: 34 additions & 0 deletions resources/imgs/logo.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://b86blw2jmusqy"
path="res://.godot/imported/logo.png-9ab8ae09bf0e1eef5bb6d45a27506605.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://resources/imgs/logo.png"
dest_files=["res://.godot/imported/logo.png-9ab8ae09bf0e1eef5bb6d45a27506605.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1