Closed abey79 closed 9 months ago
This PR adds support for custom struct (both with named and unnamed fields) to be used as sketch parameter. This is done via the new Widget derive macro:
struct
Widget
#[derive(Sketch, Default)] struct DemoSketch { custom_struct: CustomStruct, } #[derive(Widget, Default)] struct CustomStruct { #[param(slider, min = 0.0, max = 10.0)] my_param: f64, }
Nesting is supported.
A new ui_demo.rs example is introduced to demonstrate/test all supported types and combinations.
ui_demo.rs
This PR adds support for custom
struct
(both with named and unnamed fields) to be used as sketch parameter. This is done via the newWidget
derive macro:Nesting is supported.
A new
ui_demo.rs
example is introduced to demonstrate/test all supported types and combinations.