Skip to content

Commit

Permalink
Revert "Make text not-pickable by default"
Browse files Browse the repository at this point in the history
This reverts commit 9a0eb8c.
  • Loading branch information
alice-i-cecile committed Oct 2, 2024
1 parent 9a0eb8c commit ac21846
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions crates/bevy_ui/src/node_bundles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use crate::{
};
use bevy_asset::Handle;
use bevy_ecs::bundle::Bundle;
use bevy_picking::Pickable;
use bevy_render::view::{InheritedVisibility, ViewVisibility, Visibility};
use bevy_transform::prelude::{GlobalTransform, Transform};

Expand Down Expand Up @@ -116,7 +115,7 @@ pub struct ImageBundle {
///
/// The positioning of this node is controlled by the UI layout system. If you need manual control,
/// use [`Text2dBundle`](bevy_text::Text2dBundle).
#[derive(Bundle, Debug)]
#[derive(Bundle, Debug, Default)]
pub struct TextBundle {
/// Describes the logical size of the node
pub node: Node,
Expand Down Expand Up @@ -154,33 +153,6 @@ pub struct TextBundle {
pub z_index: ZIndex,
/// The background color that will fill the containing node
pub background_color: BackgroundColor,
/// Whether or not this text is pickable.
///
/// By default, this is set to [`Pickable::IGNORE`].
pub pickable: Pickable,
}

impl Default for TextBundle {
fn default() -> Self {
Self {
node: Default::default(),
style: Default::default(),
text: Default::default(),
buffer: Default::default(),
text_layout_info: Default::default(),
text_flags: Default::default(),
calculated_size: Default::default(),
focus_policy: Default::default(),
transform: Default::default(),
global_transform: Default::default(),
visibility: Default::default(),
inherited_visibility: Default::default(),
view_visibility: Default::default(),
z_index: Default::default(),
background_color: Default::default(),
pickable: Pickable::IGNORE,
}
}
}

#[cfg(feature = "bevy_text")]
Expand Down

0 comments on commit ac21846

Please sign in to comment.