Skip to content
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

Decouple BackgroundColor from UiImage #11165

Merged
merged 5 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions crates/bevy_ui/src/node_bundles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ pub struct ImageBundle {
pub style: Style,
/// The calculated size based on the given image
pub calculated_size: ContentSize,
/// The background color, which serves as a "fill" for this node
///
/// Combines with `UiImage` to tint the provided image.
pub background_color: BackgroundColor,
/// The image of the node
pub image: UiImage,
/// The size of the image in pixels
Expand Down Expand Up @@ -140,10 +136,6 @@ pub struct AtlasImageBundle {
pub style: Style,
/// The calculated size based on the given image
pub calculated_size: ContentSize,
/// The background color, which serves as a "fill" for this node
///
/// Combines with `UiImage` to tint the provided image.
pub background_color: BackgroundColor,
/// The image of the node
pub image: UiImage,
/// A handle to the texture atlas to use for this Ui Node
Expand Down Expand Up @@ -319,10 +311,6 @@ pub struct ButtonBundle {
pub interaction: Interaction,
/// Whether this node should block interaction with lower nodes
pub focus_policy: FocusPolicy,
/// The background color, which serves as a "fill" for this node
///
/// When combined with `UiImage`, tints the provided image.
pub background_color: BackgroundColor,
/// The color of the Node's border
pub border_color: BorderColor,
/// The image of the node
Expand All @@ -349,13 +337,12 @@ pub struct ButtonBundle {
impl Default for ButtonBundle {
fn default() -> Self {
Self {
focus_policy: FocusPolicy::Block,
node: Default::default(),
button: Default::default(),
style: Default::default(),
border_color: BorderColor(Color::NONE),
interaction: Default::default(),
background_color: Default::default(),
focus_policy: FocusPolicy::Block,
border_color: BorderColor(Color::NONE),
image: Default::default(),
transform: Default::default(),
global_transform: Default::default(),
Expand Down
Loading