diff --git a/entities/game/card_template/scenes/CardTemplate.tscn b/entities/game/card_template/scenes/CardTemplate.tscn index fded758..18bcf55 100644 --- a/entities/game/card_template/scenes/CardTemplate.tscn +++ b/entities/game/card_template/scenes/CardTemplate.tscn @@ -105,6 +105,7 @@ target_offset = Vector2(13, 13) animation_time = 0.1 [node name="CardBackground" type="NinePatchRect" parent="CardContentGroup" unique_id=589517874 groups=["card_content"]] +visible = false offset_right = 500.0 offset_bottom = 500.0 texture = SubResource("AtlasTexture_h72da") @@ -214,11 +215,14 @@ volume = -15.0 [connection signal="card_tooltip_changed" from="." to="CardContentGroup/CardNameBackground/CardName" method="set_tooltip"] [connection signal="deck_changed" from="." to="CardContentGroup/DropShadow" method="deck_changed"] [connection signal="deck_changed" from="." to="CardBack" method="deck_changed"] +[connection signal="focus_changed" from="." to="CardContentGroup/DropShadow" method="focus_changed"] [connection signal="focus_changed" from="." to="CardBack" method="focus_changed"] +[connection signal="hide_card" from="." to="CardContentGroup/CardBackground" method="hide"] [connection signal="hide_card" from="." to="CardContentGroup/CardNameBackground/CardName" method="card_hidden"] [connection signal="hide_card" from="." to="CardBack" method="toggle_on"] [connection signal="remove_requested" from="." to="CardBack" method="removal_planed"] [connection signal="show_card" from="." to="CardContentGroup" method="show_card_content"] +[connection signal="show_card" from="." to="CardContentGroup/CardBackground" method="show"] [connection signal="show_card" from="." to="CardBack" method="toggle_off"] [connection signal="ready_for_destruction" from="CardContentGroup" to="." method="destory_now"] [connection signal="fully_hidden" from="CardBack" to="." method="signal_repeater_fully_hidden"] diff --git a/entities/game/card_template/scripts/CardDropShadow.gd b/entities/game/card_template/scripts/CardDropShadow.gd index c09c2be..4c172a1 100644 --- a/entities/game/card_template/scripts/CardDropShadow.gd +++ b/entities/game/card_template/scripts/CardDropShadow.gd @@ -14,11 +14,8 @@ func deck_changed(deck: MemoryDeckResource) -> void: if deck.card_back != null: texture = deck.card_back -func got_focus() -> void: - _animate_shadow(true) - -func lost_focus() -> void: - _animate_shadow(false) +func focus_changed(new_state: bool) -> void: + _animate_shadow(new_state) func _animate_shadow(animate_in: bool) -> void: if animate_in: