Rename Val evaluate to resolve and implement viewport variant support#9568
Merged
alice-i-cecile merged 13 commits intobevyengine:mainfrom Aug 29, 2023
Merged
Rename Val evaluate to resolve and implement viewport variant support#9568alice-i-cecile merged 13 commits intobevyengine:mainfrom
Val evaluate to resolve and implement viewport variant support#9568alice-i-cecile merged 13 commits intobevyengine:mainfrom
Conversation
* ExtractUiNode * ExtractUiNodeBorder * ExtractUiNodeText * ExtractUiNodeAtlasImage These are added to the relevant UI node bundles. The UI's extraction functions now have query filters that allow selective extraction of UI node entities: * `extract_uinode` has filter `With<ExtractUiNode>` * `extract_uinode_borders` has filter `With<ExtractUiNodeBorder>` * `extract_text_uinodes` has filter `With<ExtractUiNodeText>` * `extract_atlas_uinodes` has filter `With<ExtractUiNodeAtlasImage>`
* Renamed `_with_size` functions to `_with_context` * Added a `viewport_size` parameter to its methods: - `evaluate` - `try_add_with_context` - `try_add_assign_with_context` - `try_sub_with_context` - `try_sub_assign_with_context` * Added support for the viewport `Val` variants to `evaluate`
This reverts commit 0a88bb5.
Contributor
Author
|
Maybe both |
alice-i-cecile
requested changes
Aug 25, 2023
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
resolve is a much better name. Code changes look good though!
Val's viewport variantsVal evaluate to resolve and implement support for the viewport variants
Val evaluate to resolve and implement support for the viewport variantsVal evaluate to resolve and implement viewport variant support
alice-i-cecile
approved these changes
Aug 25, 2023
nicoburns
approved these changes
Aug 28, 2023
Contributor
nicoburns
left a comment
There was a problem hiding this comment.
Looks good to me. I've left a few suggestions around docs/naming.
…actions. Further tweak to comments.
43 tasks
rdrpenguin04
pushed a commit
to rdrpenguin04/bevy
that referenced
this pull request
Jan 9, 2024
…upport (bevyengine#9568) # Objective Rename `Val`'s `evaluate` method to `resolve`. Implement `resolve` support for `Val`'s viewport variants. fixes bevyengine#9535 --- ## Changelog `bevy_ui::ui_node::Val`: * Renamed the following methods and added a `viewport_size` parameter: - `evaluate` to `resolve` - `try_add_with_size` to `try_add_with_context` - `try_add_assign_with_size` to `try_add_assign_with_context` - `try_sub_with_size` to `try_sub_with_context` - `try_sub_assign_with_size` to `try_sub_assign_with_context` * Implemented `resolve` support for `Val`'s viewport coordinate types ## Migration Guide * Renamed the following `Val` methods and added a `viewport_size` parameter: - `evaluate` to `resolve` - `try_add_with_size` to `try_add_with_context` - `try_add_assign_with_size` to `try_add_assign_with_context` - `try_sub_with_size` to `try_sub_with_context` - `try_sub_assign_with_size` to `try_sub_assign_with_context`
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.
Objective
Rename
Val'sevaluatemethod toresolve.Implement
resolvesupport forVal's viewport variants.fixes #9535
Changelog
bevy_ui::ui_node::Val:viewport_sizeparameter:evaluatetoresolvetry_add_with_sizetotry_add_with_contexttry_add_assign_with_sizetotry_add_assign_with_contexttry_sub_with_sizetotry_sub_with_contexttry_sub_assign_with_sizetotry_sub_assign_with_contextresolvesupport forVal's viewport coordinate typesMigration Guide
Valmethods and added aviewport_sizeparameter:evaluatetoresolvetry_add_with_sizetotry_add_with_contexttry_add_assign_with_sizetotry_add_assign_with_contexttry_sub_with_sizetotry_sub_with_contexttry_sub_assign_with_sizetotry_sub_assign_with_context