-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vector types and number improvements #2094
Merged
Jowan-Spooner
merged 11 commits into
dialogic-godot:main
from
Invertex:vector-types-and-number-improvements
Feb 27, 2024
Merged
Vector types and number improvements #2094
Jowan-Spooner
merged 11 commits into
dialogic-godot:main
from
Invertex:vector-types-and-number-improvements
Feb 27, 2024
Conversation
This file contains 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
Added Vector3 and Vector4 types, unified under a common base, so people making custom nodes have a unified way to write that data. Often people will want to use nodes that manipulate 3D space data, like the Camera or 3D character positions for example, so Vector3 is important. Updated some of the code for the Number field as well to support more display customization, partly to clean up Vector display. The increment/decrement button can be optionally disabled through an extras flag, as well as a left side label tied to the number field itself. Split off the icon resource into a dedicated resource that can be shared among elements, and also split it in half so up and down can be visually distinct and clear on which you're clicking.
Hello, thanks for the PR. I would prefer if we keep the arrows as they are for now and discuss the styling in an issue or the Discord. |
No problem, removed the changes to the arrows. |
This reverts commit 3a4d94a.
-Added back vertically split value change arrows with independent events and highlighting -Value box and arrows respond to arrow keys to adjust value accordingly -Key or mouse can be held to start a continuous adjustment of value -Suffix and Affix added as integrated Labels to the side of input field, keeping things tied together while not being a part of the actual value. -Adjustment arrows also encapsulated by the input field in the same manner. -Adjustment arrows will disable themselves when hitting a Min or Max value to visually indicate a limit was hit.
cfc6804
to
04e8279
Compare
Didn't realize len() didn't work on the Vectors, but the section I used it is rarely called so didn't notice. Refined the Vector classes to organize the logic flow better. Got rid of a bug with the Number class that was resulting in max precision long numbers showing up in the fields upon restart despite "enforce_snap" being on.
Invertex
commented
Feb 25, 2024
- Fixed number fields causing line they are on to expand extra vertically - Fixed number fields pushing elements to the right of them to the far end - Touched up some code styling
The small delay before activation of the auto-incrementing allowed for situations where click was released during the delay, but pressed down again before the delay was finished, resulting in auto-increment triggering when it shouldn't, resulting in inconsistent number changing behavior.
Not a style that was going to be reasonably used by other things, so integrated it into the scene file to reduce file clutter
- on focus select all - extend field box to full number field - pad decimal numbers based on step
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.
Added Vector3 and Vector4 types, unified under a common base, so people making custom nodes have a unified way to write that data. Often people will want to use nodes that manipulate 3D space data, like the Camera or 3D character positions for example, so Vector3 is important.
Updated some of the code for the Number field as well to support more display customization.
Main changes:
"hide_step_button"
extras_option to hide the Adjustment arrows"affix"
&"suffix"
extras_option inputs for an event to define those labels