Skip to content

Commit

Permalink
button should block
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Jan 11, 2023
1 parent d153805 commit 82220d0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion crates/bevy_ui/src/node_bundles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
}
}
}

0 comments on commit 82220d0

Please sign in to comment.