Open ickshonpe opened 3 months ago
Yeah I think that this should end up creating borders? I don't hold that opinion very strongly though.
Yeah I think that this should end up creating borders? I don't hold that opinion very strongly though.
Yeah I'm not very clear about how this should work. I've reimplemented UI texture slicing using a shader and I was trying to match my changes to the old api but it feels like it would actually be easier just to use the border geometry from the layout because I'm not sure what the min_corner_scale
field does :sweat:.
Another problem is that the nine-patcher doesn't just draw a border but also a background in the center. We could just not draw the center patch though, depending.
Thought about this and I think all it needs is a UiImageScaleMode
component copying ImageScaleMode
but without the max_corner_size
field, and it will work fine.
What problem does this solve or what need does it fill?
Borders created using the UI's texture slicing api aren't borders in the UI layout. This means that for example that left-aligned text will align at the left edge of the uinode, not the inner edge of the border, and write over the ninepatch border:
What solution would you like?
Have an option to draw borders from the UI layout using the ninepatch api.
What alternative(s) have you considered?
You can add an invisable border the same size as the ninepatch border. This might be awkward to keep synchronised though.