Open ickshonpe opened 2 days ago
I would support this. However I did try thinking of a less Ui centric name but couldn't come up with one.
Should this even be called BorderRect
? Seems like the purpose of this class is to represent paddings from the four directions rather than explicitly define a shape. Maybe something like BorderInsets
or Insets
?
What problem does this solve or what need does it fill?
It's in
bevy_sprite::texture_slice
at the moment. I've been using it in the UI to hold border and padding values though.What solution would you like?
Move it into
bevy_math::rects
.What alternative(s) have you considered?
We could just use
Rect
to hold inset/border/padding values. Different types make its easier to understand that it represents inset values relative to a rectangle and not a rectangle itself.