Skip to content

NineSlice

const NineSlice: Component

Nine-slice scaling for UI panels, buttons and dialog boxes: the borders (in image pixels) keep their size and only the middle stretches, so one small image fits any Sprite.w/h. [NineSlice, { left: 8, right: 8, top: 8, bottom: 8 }]. scale draws the borders bigger (2 = each image pixel covers 2x2 sprite pixels), for pixel art UI scaled to the screen.