bevy/examples/window
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
..
clear_color.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
low_power.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
multiple_windows.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
scale_factor_override.rs Make the default background color of NodeBundle transparent (#6211) 2022-10-09 21:03:05 +00:00
transparent_window.rs Example cleanup (#6131) 2022-09-30 13:25:27 +00:00
window_resizing.rs Example cleanup (#6131) 2022-09-30 13:25:27 +00:00
window_settings.rs Example cleanup (#6131) 2022-09-30 13:25:27 +00:00