-
-
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
[Merged by Bors] - Cleaning up NodeBundle, and some slight UI module re-organization #6473
Conversation
…mera config stuff from the pre-made UI node bundles.
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.
Agreed on all of these changes. This removes an important footgun, and the module organization is better.
This is technically a breaking change but I don't think it needs a migration guide. |
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.
Yeah, I don't think this needs a migration guide either.
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.
Good change, agree on all changes!
@bzm3r those doc links are genuinely broken :) |
bors r+ |
) # Objective `NodeBundle` contains an `image` field, which can be misleading, because if you do supply an image there, nothing will be shown to screen. You need to use an `ImageBundle` instead. ## Solution * `image` (`UiImage`) field is removed from `NodeBundle`, * extraction stage queries now make an optional query for `UiImage`, if one is not found, use the image handle that is used as a default by `UiImage`: https://github.com/bevyengine/bevy/blob/c019a60b39c5683656025bc9d24a02744aa59dea/crates/bevy_ui/src/ui_node.rs#L464 * touching up docs for `NodeBundle` to help guide what `NodeBundle` should be used for * renamed `entity.rs` to `node_bundle.rs` as that gives more of a hint regarding the module's purpose * separating `camera_config` stuff from the pre-made UI node bundles so that `node_bundle.rs` makes more sense as a module name.
…vyengine#6473) # Objective `NodeBundle` contains an `image` field, which can be misleading, because if you do supply an image there, nothing will be shown to screen. You need to use an `ImageBundle` instead. ## Solution * `image` (`UiImage`) field is removed from `NodeBundle`, * extraction stage queries now make an optional query for `UiImage`, if one is not found, use the image handle that is used as a default by `UiImage`: https://github.com/bevyengine/bevy/blob/c019a60b39c5683656025bc9d24a02744aa59dea/crates/bevy_ui/src/ui_node.rs#L464 * touching up docs for `NodeBundle` to help guide what `NodeBundle` should be used for * renamed `entity.rs` to `node_bundle.rs` as that gives more of a hint regarding the module's purpose * separating `camera_config` stuff from the pre-made UI node bundles so that `node_bundle.rs` makes more sense as a module name.
Objective
NodeBundle
contains animage
field, which can be misleading, because if you do supply an image there, nothing will be shown to screen. You need to use anImageBundle
instead.Solution
image
(UiImage
) field is removed fromNodeBundle
,UiImage
, if one is not found, use the image handle that is used as a default byUiImage
:bevy/crates/bevy_ui/src/ui_node.rs
Line 464 in c019a60
NodeBundle
to help guide whatNodeBundle
should be used forentity.rs
tonode_bundle.rs
as that gives more of a hint regarding the module's purposecamera_config
stuff from the pre-made UI node bundles so thatnode_bundle.rs
makes more sense as a module name.