ParameterInput: Don't snap blocks for option inputs#219
Merged
dbnicholson merged 1 commit intomainfrom Sep 12, 2024
Merged
Conversation
manuq
approved these changes
Sep 12, 2024
Contributor
manuq
left a comment
There was a problem hiding this comment.
Excellent! I didn't know that making the snap point invisible was enough to prevent snapping.
addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.gd
Outdated
Show resolved
Hide resolved
Contributor
Yeah, for the more general problem we talked about splitting the vector into 2 floating-point snap points so the X and Y components can be compared separately. |
Option inputs only allow selecting from a set of predefined OptionData values. Prevent trying to snap a block to an option input by making the snap point invisible. Fixes: #167
5e0c568 to
9209a40
Compare
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.
Option inputs only allow selecting from a set of predefined OptionData values. Prevent trying to snap a block to an option input by making the snap point invisible.
Fixes: #167
Note that this doesn't fix the more general problem that the comparison block can't handle vectors, but I think it fixes the more important issue that you could snap a block into options.