bevy-inspector-egui icon indicating copy to clipboard operation
bevy-inspector-egui copied to clipboard

Can't display `RangeInclusive<f32>`

Open cactusdualcore opened this issue 1 year ago • 2 comments

This is pretty much just #165, but for the RangeInclusive<f32> type.

I tried adding the Plugin and tried registering the type explicitly, but neither worked.

cactusdualcore avatar Jul 13 '24 13:07 cactusdualcore

The normal Range<f32> works flawlessly though.

cactusdualcore avatar Jul 13 '24 14:07 cactusdualcore

Same problem here. And due to the orphan rule I can not implement the trait for RangeInclusive myself.

Affinator avatar Jul 23 '24 14:07 Affinator

I've added support for RangeInclusive in 0.26.0: https://github.com/jakobhellermann/bevy-inspector-egui/commit/fb7bb148bde469da4efa8310ce183cb4b9aeb690

Same problem here. And due to the orphan rule I can not implement the trait for RangeInclusive myself.

For the record, you don't need to implement any trait to register a type as inspectable, just insert a new InspectorEguiImpl using function pointers: type_registry.get_mut(type_id).unwrap().insert(InspectorEguiImpl::new(fn_mut, fn_readonly, fn_many));

jakobhellermann avatar Sep 17 '24 09:09 jakobhellermann