melonJS
    Preparing search index...

    Interface UIPanelSkin

    The art of a skinned UIPanel: one atlas region, drawn as a nine-slice over the whole panel and stretched with it.

    const panel = new UIPanel(100, 80, {
    width: 320,
    height: 240,
    skin: { atlas, region: "panel_blue", insetx: 16, insety: 16 },
    });
    interface UIPanelSkin {
        atlas: TextureAtlas;
        insetx?: number;
        insety?: number;
        region: string;
    }

    Hierarchy (View Summary)

    Index

    the atlas the regions are read from

    insetx?: number

    the width of a corner kept unscaled, in pixels; a quarter of the region's width by default

    insety?: number

    the height of a corner kept unscaled, in pixels; a quarter of the region's height by default

    region: string

    the name of the atlas region drawn as the background