Register some extra types to type registry (#8430)
# Objective Fixes #8415. ## Solution I simply added the missing types to the type registry. ## Changelog Added `#[reflect(Component]` to `bevi_ui::ui_node::ZIndex`, since it impls `Component` and `Reflect.` The following types have been added to the type registry: 1. `bevy_ui::ZIndex` 2. `bevy_math::Rect` 3. `bevy_text::BreakLineOn` 4. `bevy_text::Text2dBounds`
This commit is contained in:
parent
919919c998
commit
30ac157b80
@ -95,7 +95,8 @@ fn register_math_types(app: &mut App) {
|
||||
.register_type::<bevy_math::Mat3A>()
|
||||
.register_type::<bevy_math::Mat4>()
|
||||
.register_type::<bevy_math::DQuat>()
|
||||
.register_type::<bevy_math::Quat>();
|
||||
.register_type::<bevy_math::Quat>()
|
||||
.register_type::<bevy_math::Rect>();
|
||||
}
|
||||
|
||||
/// Setup of default task pools: `AsyncComputeTaskPool`, `ComputeTaskPool`, `IoTaskPool`.
|
||||
|
||||
@ -72,11 +72,12 @@ impl Plugin for TextPlugin {
|
||||
app.add_asset::<Font>()
|
||||
.add_asset::<FontAtlasSet>()
|
||||
.register_type::<Text>()
|
||||
.register_type::<Text2dBounds>()
|
||||
.register_type::<TextSection>()
|
||||
.register_type::<Vec<TextSection>>()
|
||||
.register_type::<TextStyle>()
|
||||
.register_type::<Text>()
|
||||
.register_type::<TextAlignment>()
|
||||
.register_type::<BreakLineOn>()
|
||||
.init_asset_loader::<FontLoader>()
|
||||
.init_resource::<TextSettings>()
|
||||
.init_resource::<FontAtlasWarning>()
|
||||
|
||||
@ -102,6 +102,7 @@ impl Plugin for UiPlugin {
|
||||
.register_type::<JustifyItems>()
|
||||
.register_type::<JustifySelf>()
|
||||
.register_type::<Node>()
|
||||
.register_type::<ZIndex>()
|
||||
// NOTE: used by Style::aspect_ratio
|
||||
.register_type::<Option<f32>>()
|
||||
.register_type::<Overflow>()
|
||||
|
||||
@ -1541,6 +1541,7 @@ pub struct CalculatedClip {
|
||||
///
|
||||
/// Nodes without this component will be treated as if they had a value of [`ZIndex::Local(0)`].
|
||||
#[derive(Component, Copy, Clone, Debug, Reflect)]
|
||||
#[reflect(Component)]
|
||||
pub enum ZIndex {
|
||||
/// Indicates the order in which this node should be rendered relative to its siblings.
|
||||
Local(i32),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user