-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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() } ```
- Loading branch information
1 parent
5e71d7f
commit 1738527
Showing
4 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters