melonJS
    Preparing search index...

    Interface UICheckboxSkin

    The art of a skinned UICheckbox: one atlas region per state.

    Only on and off are needed. Each region is drawn as a square of UICheckboxSettings#boxSize pixels (the height of off by default). Every region named is looked up when the checkbox is built, so a misspelt name throws there.

    // two regions: the rest fall back to them
    const skin = { atlas, on: "green_boxCheckmark", off: "grey_boxCheckmark" };
    interface UICheckboxSkin {
        atlas: TextureAtlas;
        disabledOff?: string;
        disabledOn?: string;
        hoverOff?: string;
        hoverOn?: string;
        insetx?: number;
        insety?: number;
        off: string;
        on: string;
    }

    Hierarchy (View Summary)

    Index

    the atlas the regions are read from

    disabledOff?: string

    the region drawn when not checked and disabled; off at half opacity if left out

    disabledOn?: string

    the region drawn when checked and disabled; on at half opacity if left out

    hoverOff?: string

    the region drawn when not checked and under the pointer; off if left out

    hoverOn?: string

    the region drawn when checked and under the pointer; on if left out

    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

    off: string

    the region drawn when not checked

    on: string

    the region drawn when checked