Skip to content

Commit

Permalink
bevy_ui: reflect missing types (#9677)
Browse files Browse the repository at this point in the history
Register `UiCameraConfig` and `UiTextureAtlasImage`, and derive
`Reflect` on `UiScale` and register that too.
  • Loading branch information
SludgePhD committed Sep 2, 2023
1 parent e9b3aeb commit ea734ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/bevy_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub mod update;
pub mod widget;

use bevy_derive::{Deref, DerefMut};
use bevy_reflect::Reflect;
#[cfg(feature = "bevy_text")]
use bevy_render::camera::CameraUpdateSystem;
use bevy_render::{extract_component::ExtractComponentPlugin, RenderApp};
Expand Down Expand Up @@ -68,7 +69,7 @@ pub enum UiSystem {
///
/// A multiplier to fixed-sized ui values.
/// **Note:** This will only affect fixed ui values like [`Val::Px`]
#[derive(Debug, Resource, Deref, DerefMut)]
#[derive(Debug, Reflect, Resource, Deref, DerefMut)]
pub struct UiScale(pub f64);

impl Default for UiScale {
Expand Down Expand Up @@ -110,9 +111,12 @@ impl Plugin for UiPlugin {
.register_type::<RelativeCursorPosition>()
.register_type::<RepeatedGridTrack>()
.register_type::<Style>()
.register_type::<UiCameraConfig>()
.register_type::<UiImage>()
.register_type::<UiImageSize>()
.register_type::<UiRect>()
.register_type::<UiScale>()
.register_type::<UiTextureAtlasImage>()
.register_type::<Val>()
.register_type::<BorderColor>()
.register_type::<widget::Button>()
Expand Down

0 comments on commit ea734ab

Please sign in to comment.