When using nine-patch, sourceXXX (such as sourceTop) does not work

I’m sorry that English is not my native language, so the expression may not be so accurate.

I’m creating a Game GUI by Babylon.js.But button texture mixed with other controls textures.


Yes, this texture from a minecraft resource pack

I use sourceTop, sourceWidth and sourceHeight to make the button display correctly. But when I using STRETCH_NINE_PATCH mode, sourceXXX not working.

Use sourceXXX and STRETCH_NINE_PATCH | Babylon.js Playground (babylonjs.com)

Adding @carolhmj our GUI guru :slight_smile:

1 Like

Thanks for reporting this! A fix will be merged with fix stretch nine patch to respect sourceXXX parameters by carolhmj · Pull Request #14222 · BabylonJS/Babylon.js (github.com)