SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
237 stars 21 forks source link

RoundedRect bails out to rect if radius is zero #134

Closed Uriopass closed 11 months ago

Uriopass commented 11 months ago

This allows reusing the rounded rect everywhere a component can have rounded drawing needs without needed to special case the zero radius case (button region, box, ...) as well as handling pathological cases a bit nicer.

I think we could also merge colored_box with round_rect by simply having colored_box provide a border_radius parameter (we can keep the shorthand though)