Overview : Using a small stylized image (90×91 pixels) we apply it to a GUI node and set the slice-9 properties, we can then adjust the size and retain the styling without stretching and distortion. :More on Slice-9 with Defold:
The setup consists of a gui collection, gui script, a box node and a texture atlasBox Nodecontains:
- A texture set to stylized wood plank image.
- Size Mode set to Manual
- Slice 9 adjusted settings
Gui scriptUse:
- For animating the node to different sizes, showing slice-9 at its potential.