GUI.Button child stretching

Hi, I’m sorry to address you so often, but the point is the time limit) I can not figure it out. Why is the first child of the button (background) behaving normally and the other child (orange background of the button) stretched ??
https://playground.babylonjs.com/#V4KWNU

All this is done in order to fix the arrangement of elements that breaks on mobile devices (different resolution), the buttons simply "run" against each other, I found a tip here on the forum that you need to set the sizes and positioning of the elements in percent, I will be glad to any comments on this )

When the buttonContainer is stretched, the golden background is stretched, but why is the background not stretched? unclear

backgroundActive.stretch = BABYLON.GUI.Image.STRETCH_UNIFORM;

Need to add this line, a lot of time is gone, well, maybe someone will come in handy)

3 Likes