-
-
Notifications
You must be signed in to change notification settings - Fork 105
CVPreviewPopup
Divided by Zer0 edited this page Mar 9, 2022
·
2 revisions
Extends: Popup
The popup with an instance of a card instide. Typically in larger version for easy viewing.
var preview_card: Card
The card currently being shown in a popup.
var focus_info: Node
The card currently being shown in a popup. The popup panel which contains the card.
func get_preview_placement() -> Vector2
Figures out where to place the card preview in respect to the player's mouse.
func show_preview_card(card) -> void
Instances a card object. Populates it with the card details Then displays it in the popup. The variable passed can be a card name, or a card instance. If it's a card instance, it will be added to this node as a child directly.
func hide_preview_card() -> void
Hides currently shown card. We're modulating to 0 instead of hide() because that messes with the rich text labels formatting
func has_preview_card() -> bool
Returns true if the preview_card variable has a valid Card instance else returns false