Iced ~ How would I draw up my own custom widgets?

Hey guys I wanted to design my own custom widgets using the GUI library iced:

https://iced.rs/

image

I wanted to specifically draw a custom circle which serves as a button, but I am not too sure how or where would I get started to create my own widgets, any ideas?

I went here:

But now what do I do if I import Widget?

    impl<'a, Message> NumericInput<'a, Message> {
        pub fn new(
            state: &'a mut State,
            value: Option<u32>,
            on_change: impl Fn(Option<u32>) -> Message + 'static,
        ) -> Self {
            Self {
                state,
                value,
                on_change: Box::new(on_change),
            }
        }
    }

I believe I have to use this or something but I am not sure how any of this works?

Check out this example:

1 Like