bevy/examples/ui
TimJentzsch 1738527902 Make the default background color of NodeBundle transparent (#6211)
# 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()
}
```
2022-10-09 21:03:05 +00:00
..
button.rs Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
font_atlas_debug.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
scaling.rs Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
text.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
text_debug.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
transparency_ui.rs Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
ui.rs Make the default background color of NodeBundle transparent (#6211) 2022-10-09 21:03:05 +00:00