diff --git a/CHANGELOG.md b/CHANGELOG.md index 65285f8a..fda67811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,12 @@ ### New Features -* Now each card type has exported variables for the canonical card size as well as the various scaling. **This finally allows the game to utilize different card sizes at the same time**. CardContainers and BoardGrid for different card sizes now also need to have a defined card_size of the card they're going to host. +* Now each card type has exported variables for the canonical card size as well as the various scaling. **This finally allows the game to utilize different card sizes at the same time**. CardContainers and BoardGrids for different card sizes now also need to have a defined card_size matching the card they're going to host. * Added exported vars for controlling card tween duration (@stevosaurus) * Mouse will not teleport to a card's top-right when dragging starts. (@stevosaurus) * Adjustments to prevent Rich Text Labels from sizing at 4 font size * Recursive rescaling will also now take into account MarginContainer margins -* Added font_size_caching which should now reduce time lost while calculating font sizes. +* Added font_size_caching which should now reduce time lost while calculating font sizes.Requires CFConst.FONT_SIZE_CACHE #### ScriptingEngine diff --git a/README.md b/README.md index 3669cd3f..9b0c10dd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Godot Card Game Framework [1.14](CHANGELOG.md) +# Godot Card Game Framework [1.15](CHANGELOG.md) ![Godot Card Game Framework preview image](preview.png "Godot Card Game Framework preview image") @@ -34,6 +34,7 @@ Pull requests are more than welcome ;) * Can select layout of your CardContainers from a simple drop-down menu. * Automatic and manual Grid-based, or Free-form placement on the board, or a combination of both, on a per-card-type basis. * Functions from saving/loading settings from disk. +* Caching mechanisms to reduce loading and instancing times. * Collecting [game statistics](https://github.com/db0/CGF-Stats) * Easy customization via Themes. [Dark Theme](https://mounirtohami.itch.io/godot-dark-theme) used in Demo, provided by Mounir Tohami * A functional and customizable Card Library. diff --git a/src/core/ScriptingEngine.gd b/src/core/ScriptingEngine.gd index 3f24acf4..dad759d3 100644 --- a/src/core/ScriptingEngine.gd +++ b/src/core/ScriptingEngine.gd @@ -628,7 +628,7 @@ func add_grid(script: ScriptTask) -> void: # +1 card-width below, becase we assume they're spanwining with more # than 1 column. grid.rect_position.y += \ - iter * grid.canonical_size.y * grid.card_play_scale + iter * grid.card_size.y * grid.card_play_scale # Task for modifying a a counter. # If this task is specified, the variable [counters](Board#counters) **has** to be set