SecondHalfGames / yakui

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

RoundedRect bails out to rect if radius is zero #134

Closed Uriopass closed 6 months ago

Uriopass commented 6 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)