2019-05-04 22:01:00 +00:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
onready var animation = $AnimationPlayer
|
|
|
|
|
2019-05-05 22:39:55 +00:00
|
|
|
func _card_selected(card: Card):
|
2019-05-04 22:01:00 +00:00
|
|
|
animation.play("fade ui card")
|
|
|
|
|
2019-05-05 22:39:55 +00:00
|
|
|
func _card_unselected(card: Card):
|
2019-05-04 22:01:00 +00:00
|
|
|
animation.play_backwards("fade ui card")
|
2019-05-05 23:35:58 +00:00
|
|
|
|
|
|
|
func show_card_menu(card):
|
|
|
|
var menu := PopupMenu.new()
|
|
|
|
menu.add_item("Flip", 0)
|
|
|
|
menu.connect("id_pressed", card, "_menu_action")
|
|
|
|
add_child(menu)
|
|
|
|
menu.popup(Rect2(get_viewport().get_mouse_position(), Vector2(100,10)))
|