Skip to content

CVPreviewPopup

Divided by Zer0 edited this page Mar 9, 2022 · 2 revisions

CVPreviewPopup

Extends: Popup

Description

The popup with an instance of a card instide. Typically in larger version for easy viewing.

Property Descriptions

preview_card

var preview_card: Card

The card currently being shown in a popup.

focus_info

var focus_info: Node

The card currently being shown in a popup. The popup panel which contains the card.

Method Descriptions

get_preview_placement

func get_preview_placement() -> Vector2

Figures out where to place the card preview in respect to the player's mouse.

show_preview_card

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.

hide_preview_card

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

has_preview_card

func has_preview_card() -> bool

Returns true if the preview_card variable has a valid Card instance else returns false