mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
Remove needless manual default impl of ButtonBundle (#6970)
# Objective - Remove a manual impl block for something that can be derived - Correct a misleading doc comment.
This commit is contained in:
parent
15b19b930c
commit
a5106c841f
1 changed files with 2 additions and 21 deletions
|
@ -71,7 +71,7 @@ pub struct ImageBundle {
|
||||||
pub calculated_size: CalculatedSize,
|
pub calculated_size: CalculatedSize,
|
||||||
/// The background color, which serves as a "fill" for this node
|
/// The background color, which serves as a "fill" for this node
|
||||||
///
|
///
|
||||||
/// When combined with `UiImage`, tints the provided image.
|
/// Combines with `UiImage` to tint the provided image.
|
||||||
pub background_color: BackgroundColor,
|
pub background_color: BackgroundColor,
|
||||||
/// The image of the node
|
/// The image of the node
|
||||||
pub image: UiImage,
|
pub image: UiImage,
|
||||||
|
@ -178,7 +178,7 @@ impl Default for TextBundle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A UI node that is a button
|
/// A UI node that is a button
|
||||||
#[derive(Bundle, Clone, Debug)]
|
#[derive(Bundle, Clone, Debug, Default)]
|
||||||
pub struct ButtonBundle {
|
pub struct ButtonBundle {
|
||||||
/// Describes the size of the node
|
/// Describes the size of the node
|
||||||
pub node: Node,
|
pub node: Node,
|
||||||
|
@ -213,22 +213,3 @@ pub struct ButtonBundle {
|
||||||
/// Indicates the depth at which the node should appear in the UI
|
/// Indicates the depth at which the node should appear in the UI
|
||||||
pub z_index: ZIndex,
|
pub z_index: ZIndex,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ButtonBundle {
|
|
||||||
fn default() -> Self {
|
|
||||||
ButtonBundle {
|
|
||||||
button: Button,
|
|
||||||
interaction: Default::default(),
|
|
||||||
focus_policy: Default::default(),
|
|
||||||
node: Default::default(),
|
|
||||||
style: 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(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue