#sprite button

1 messages · Page 1 of 1 (latest)

shut glen
#

I want to have a button with observer, but If I just try spawning it like this(or with Button component) - all I see is background color:


 parent
                        .spawn((
                            Sprite::from_image(exit),
                            BorderRadius::all(Px(BORDER_RADIUS)),
                            BorderColor(Color::WHITE),
                        ))
                        .observe(do_stuff);

What is the usual way to spawn image with observer?

#

sprite button