-
-
Notifications
You must be signed in to change notification settings - Fork 105
CardViewer
Extends: PanelContainer
The Card Viewer is a basic class which is responsible for displaying all cards available in the game, either for preview, or for deckbuilding
It is meant to be extended.
export var filter_button_properties: Array = ["Type"]
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped.
export var generation_keys: Array = []
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped. If a value in a card property is in this list, the Deckbuilder will call its value_generation method to attempt to generate the value according to the game's design. Make sure that the values specified will never match normal values for that property.
export var replacements: Dictionary = {}
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped. If a value in a card property is in this list, the Deckbuilder will call its value_generation method to attempt to generate the value according to the game's design. Make sure that the values specified will never match normal values for that property. See CardConfig.REPLACEMENTS. This allows for extra replacements in the card Viewer, if needed.
export var info_panel_scene = "[PackedScene:19410]"
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped. If a value in a card property is in this list, the Deckbuilder will call its value_generation method to attempt to generate the value according to the game's design. Make sure that the values specified will never match normal values for that property. See CardConfig.REPLACEMENTS. This allows for extra replacements in the card Viewer, if needed. The custom scene which displays the card when its name is hovered.
export var list_card_object_scene = "[PackedScene:19396]"
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped. If a value in a card property is in this list, the Deckbuilder will call its value_generation method to attempt to generate the value according to the game's design. Make sure that the values specified will never match normal values for that property. See CardConfig.REPLACEMENTS. This allows for extra replacements in the card Viewer, if needed. The custom scene which displays the card when its name is hovered. We use this variable, so that the scene can be overriden with a custom one
export var grid_card_object_scene = "[PackedScene:19400]"
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped. If a value in a card property is in this list, the Deckbuilder will call its value_generation method to attempt to generate the value according to the game's design. Make sure that the values specified will never match normal values for that property. See CardConfig.REPLACEMENTS. This allows for extra replacements in the card Viewer, if needed. The custom scene which displays the card when its name is hovered. We use this variable, so that the scene can be overriden with a custom one We use this variable, so that the scene can be overriden with a custom one
export var custom_rich_text_effects: Array = []
Set a property name defined in the cards. The deckbuilder will provide one button per distinct property of that name it discovers in your card base. This buttons can be toggled on/off for quick filtering
Only supports string properties. No tags or integers. Also, all cards Should have some value in this property. It is suggested this functionality is only used on properties with few distinct values.
Also, if more than 8 distrinct properties are found, this functionality will be skipped. If a value in a card property is in this list, the Deckbuilder will call its value_generation method to attempt to generate the value according to the game's design. Make sure that the values specified will never match normal values for that property. See CardConfig.REPLACEMENTS. This allows for extra replacements in the card Viewer, if needed. The custom scene which displays the card when its name is hovered. We use this variable, so that the scene can be overriden with a custom one We use this variable, so that the scene can be overriden with a custom one These are passed to the rich_text_labels used in the card list To use as part of the card info.
func prepate_filter_buttons() -> void
func populate_available_cards() -> void
Populates the list of available cards, with all defined cards in the game
func prepare_card_grid(is_staggered: bool = false) -> var
Slowly loads all cards in to the grid We use a delay function between each card, to avoid freezing the game while instancing all the nodes
func generate_value(property: String, card_properties: Dictionary)
Extend this class and call this function, when your game has a value field Which is suposed to be autogenerated in some fashion. warning-ignore:unused_argument warning-ignore:unused_argument