db0 / godot-card-game-framework

A framework which comes with prepared scenes and classes to kickstart your card game, as well as a powerful scripting engine to use to provide full rules enforcement.
http://dbzer0.com/projects/godot-card-game-framework/
GNU Affero General Public License v3.0
892 stars 95 forks source link

Adjust QUICKSTART to also add `card_label_min_sizes` and `original_font_sizes` for new label #145

Open Sky84 opened 3 years ago

Sky84 commented 3 years ago

Step to reproduce : Follow the QUICKSTART step.

At the end, when we add just in res://src/new_card_game/CreatureFront.gd : text_expansion_multiplier["Health"] = 3; that is not enough. To me, it's working if I add this few lines after: card_labels["Health"] = $Margin/CardText/HB/Health; original_font_sizes["Health"] = 10; card_label_min_sizes["Health"] = Vector2(40,13);

db0 commented 3 years ago

The guide is a bit old by now, so it's possible it need some update. However I don't see instructing to add the expansion_multiplier. Also the card_labels setup is done as part of the guide in the ready() function

func _ready() -> void:
    card_labels["Health"] = $Margin/CardText/HB/Health
Sky84 commented 3 years ago

Oh yes, sorry. I was talking about the card_labels in reality ^^'

db0 commented 3 years ago

I do need to update the guide to mention the card_label_min_sizes and original_font_sizes dictionaries I added recently.