diff --git a/crates/bevy_ui/src/node_bundles.rs b/crates/bevy_ui/src/node_bundles.rs index 4cc814debf120d..8369b33bfe0b00 100644 --- a/crates/bevy_ui/src/node_bundles.rs +++ b/crates/bevy_ui/src/node_bundles.rs @@ -161,7 +161,7 @@ impl TextBundle { } /// A UI node that is a button -#[derive(Bundle, Clone, Debug, Default)] +#[derive(Bundle, Clone, Debug)] pub struct ButtonBundle { /// Describes the size of the node pub node: Node, @@ -196,3 +196,22 @@ pub struct ButtonBundle { /// Indicates the depth at which the node should appear in the UI pub z_index: ZIndex, } + +impl Default for ButtonBundle { + fn default() -> Self { + Self { + focus_policy: FocusPolicy::Block, + node: Default::default(), + button: Default::default(), + style: Default::default(), + interaction: Default::default(), + background_color: Default::default(), + image: Default::default(), + transform: Default::default(), + global_transform: Default::default(), + visibility: Default::default(), + computed_visibility: Default::default(), + z_index: Default::default(), + } + } +}