mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 14:40:19 +00:00
1738527902
# Objective Closes #6202. The default background color for `NodeBundle` is currently white. However, it's very rare that you actually want a white background color. Instead, you often want a background color specific to the style of your game or a transparent background (e.g. for UI layout nodes). ## Solution `Default` is not derived for `NodeBundle` anymore, but explicitly specified. The default background color is now transparent (`Color::NONE.into()`) as this is the most common use-case, is familiar from the web and makes specifying a layout for your UI less tedious. --- ## Changelog - Changed the default `NodeBundle.background_color` to be transparent (`Color::NONE.into()`). ## Migration Guide If you want a `NodeBundle` with a white background color, you must explicitly specify it: Before: ```rust let node = NodeBundle { ..default() } ``` After: ```rust let node = NodeBundle { background_color: Color::WHITE.into(), ..default() } ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |