Merged
Conversation
64fe001 to
609d19e
Compare
starnight
requested changes
Dec 5, 2024
Contributor
starnight
left a comment
There was a problem hiding this comment.
Thanks arrange this improvement. It makes more like logic flowchart!
However, I notice a bug and place suggestion.
|
|
||
| func _on_definition_changed(): | ||
| super() | ||
| _update_block_shape() |
Contributor
There was a problem hiding this comment.
The _background accessed in _update_block_shape() is only available when the node has been ready. However, seems like _on_definition_changed() will be invoked by some where before this node becomes ready and shows error:
res://addons/block_code/ui/blocks/parameter_block/parameter_block.gd:29 - Invalid assignment of property or key 'is_pointy_value' with value of type 'bool' on a base object of type 'Nil'.
I think that here should add a if condition checking is_node_ready() before _update_block_shape().
Contributor
Author
There was a problem hiding this comment.
Good catch @starnight ! I appended a fixup commit. Adding await ready did the trick.
To make entry blocks more distinguishable from the parameter blocks. Add another drag area, a rectangle that approximates the added ellipsis part. So the block can also be dragged from it. This drag area has a fixed size and doesn't expand. #278
Previously the parameter block and parameter input had a Panel node. Unlike the other blocks which had a custom shape, provided by the background control. But in the next commit we want to have different shapes for value blocks. So remove the panels and add background control nodes intead.
Mainly to test the background in isolation in a new Control scene.
Use a custom background drawing for parameter blocks and input that are of type boolean. #279
Previously all blocks had a statement shape as drag preview. Now that we have a good mapping of blocks / shapes, use the corresponding shape. A especial case is the control block which uses the background twice, one for the top part and one for the bottom part. For simplicity, use the statement shape in this case. Also, move drag colors to constants.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution from @DoomTas3r #273 so I marked the 2 relevant commits as authored by them, although I changed things aggressively. In particular:
Since I was there I also fixed the drag preview which was showing the statement block shape for all blocks. It now looks like this:
Grabación de pantalla desde 2024-12-04 17-54-01.webm
Note that sometimes the parameter block won't resize when inner blocks are moved out. But this is not a problem introduced by this PR. It happens in main too:
Grabación de pantalla desde 2024-12-04 18-01-14.webm
Fix #278
Fix #279