-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Rename Val
evaluate
to resolve
and implement viewport variant support
#9568
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.
Maybe both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I've left a few suggestions around docs/naming.
…actions. Further tweak to comments.
…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`
Objective
Rename
Val
'sevaluate
method toresolve
.Implement
resolve
support forVal
's viewport variants.fixes #9535
Changelog
bevy_ui::ui_node::Val
:viewport_size
parameter:evaluate
toresolve
try_add_with_size
totry_add_with_context
try_add_assign_with_size
totry_add_assign_with_context
try_sub_with_size
totry_sub_with_context
try_sub_assign_with_size
totry_sub_assign_with_context
resolve
support forVal
's viewport coordinate typesMigration Guide
Val
methods and added aviewport_size
parameter:evaluate
toresolve
try_add_with_size
totry_add_with_context
try_add_assign_with_size
totry_add_assign_with_context
try_sub_with_size
totry_sub_with_context
try_sub_assign_with_size
totry_sub_assign_with_context