From c8975e538e6f7c037aafaa5b67b1178b763c8389 Mon Sep 17 00:00:00 2001 From: Brice DAVIER Date: Fri, 3 Dec 2021 12:34:57 +0100 Subject: [PATCH] Rename components with Ui prefix --- pipelined/bevy_ui2/src/entity.rs | 15 +++++++-------- pipelined/bevy_ui2/src/lib.rs | 7 ++++--- pipelined/bevy_ui2/src/render/mod.rs | 6 ++---- pipelined/bevy_ui2/src/ui_node.rs | 13 +++++++------ pipelined/bevy_ui2/src/widget/image.rs | 7 ++++--- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pipelined/bevy_ui2/src/entity.rs b/pipelined/bevy_ui2/src/entity.rs index f959b265d3a29d..1e1f39e228bc72 100644 --- a/pipelined/bevy_ui2/src/entity.rs +++ b/pipelined/bevy_ui2/src/entity.rs @@ -1,7 +1,6 @@ -use super::Node; use crate::{ widget::{Button, ImageMode}, - CalculatedSize, FocusPolicy, Interaction, Style, CAMERA_UI, + CalculatedSize, FocusPolicy, Interaction, Node, Style, UiColor, UiImage, CAMERA_UI, }; use bevy_ecs::bundle::Bundle; use bevy_render2::{ @@ -15,8 +14,8 @@ use bevy_transform::prelude::{GlobalTransform, Transform}; pub struct NodeBundle { pub node: Node, pub style: Style, - pub color: crate::Color, - pub image: crate::Image, + pub color: UiColor, + pub image: UiImage, pub transform: Transform, pub global_transform: GlobalTransform, } @@ -27,8 +26,8 @@ pub struct ImageBundle { pub style: Style, pub image_mode: ImageMode, pub calculated_size: CalculatedSize, - pub color: crate::Color, - pub image: crate::Image, + pub color: UiColor, + pub image: UiImage, pub transform: Transform, pub global_transform: GlobalTransform, } @@ -65,8 +64,8 @@ pub struct ButtonBundle { pub style: Style, pub interaction: Interaction, pub focus_policy: FocusPolicy, - pub color: crate::Color, - pub image: crate::Image, + pub color: UiColor, + pub image: UiImage, pub transform: Transform, pub global_transform: GlobalTransform, } diff --git a/pipelined/bevy_ui2/src/lib.rs b/pipelined/bevy_ui2/src/lib.rs index e4739c805845c2..fa2ab742dc7df3 100644 --- a/pipelined/bevy_ui2/src/lib.rs +++ b/pipelined/bevy_ui2/src/lib.rs @@ -26,6 +26,7 @@ use bevy_asset::Handle; use bevy_ecs::schedule::{ParallelSystemDescriptorCoercion, SystemLabel}; use bevy_input::InputSystem; use bevy_math::{Rect, Size}; +use bevy_render2::texture::Image; use bevy_transform::TransformSystem; use update::ui_z_system; @@ -46,25 +47,25 @@ impl Plugin for UiPlugin { .register_type::() .register_type::() .register_type::() - .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() - .register_type::() .register_type::() .register_type::() // NOTE: used by Style::aspect_ratio .register_type::>() // NOTE: used by Image - .register_type::>>() + .register_type::>>() .register_type::() .register_type::>() .register_type::>() .register_type::>() .register_type::