diff --git a/Cargo.toml b/Cargo.toml index 9e374bb..7709ad2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,19 +8,6 @@ authors = ["Rowan Vixen ", "jms55"] bevy = "0.13.1" bevy_mod_picking = "0.18.2" dioxus = "0.4.3" -#dioxus = { git = "https://github.com/ealmloff/dioxus", branch = "fix-event-bubbling", default-features = false, features = [ -# "macro", -# "hooks", -#] } -#dioxus-rsx = { git = "https://github.com/ealmloff/dioxus", branch = "fix-event-bubbling", default-features = false, features = [ -# "hot_reload", -#], optional = true } -#dioxus-hot-reload = { git = "https://github.com/ealmloff/dioxus", branch = "fix-event-bubbling", default-features = false, features = [ -# "custom_file_watcher", -#], optional = true } -#bevy_mod_picking = { version = "0.17", default-features = false, features = [ -# "backend_bevy_ui", -#] } [features] #hot_reload = ["dioxus/hot-reload", "dioxus-rsx", "dioxus-hot-reload"] diff --git a/src/ecs_hooks.rs b/src/ecs_hooks.rs index b6bcbd7..140560c 100644 --- a/src/ecs_hooks.rs +++ b/src/ecs_hooks.rs @@ -3,7 +3,7 @@ use bevy::{ ecs::{ component::ComponentId, event::{Event, EventIterator, Events, ManualEventReader}, - query::{QueryData, QueryFilter, ReadOnlyQueryData, WorldQuery}, + query::{QueryFilter, ReadOnlyQueryData}, system::{Query, Resource, SystemState}, world::World, }, diff --git a/src/parse_attributes.rs b/src/parse_attributes.rs index d34cd9c..f717d68 100644 --- a/src/parse_attributes.rs +++ b/src/parse_attributes.rs @@ -243,5 +243,10 @@ fn parse_val(val: &str) -> Val { return Val::Vh(val); } } + if let Some((val, "")) = val.split_once("%") { + if let Ok(val) = val.parse::() { + return Val::Percent(val); + } + } panic!("Encountered invalid bevy_dioxus Val `{val}`."); }