melonJS
    Preparing search index...

    Interface UISliderSkin

    The art of a skinned UISlider: atlas regions for the track, the filled part of the track and the thumb.

    The track and the fill are stretched as nine-slices along the slider's UISliderSettings#length, and keep the region's thickness across it unless trackThickness is set. The thumb is drawn at its region's size. A disabled slider is drawn at half opacity. Every region named is looked up when the slider is built, so a misspelt name throws there.

    // a track and a thumb; no fill
    const skin = { atlas, track: "grey_sliderHorizontal", thumb: "blue_sliderDown" };
    interface UISliderSkin {
        atlas: TextureAtlas;
        fill?: string;
        insetx?: number;
        insety?: number;
        thumb: string;
        thumbHover?: string;
        track: string;
    }

    Hierarchy (View Summary)

    Index

    the atlas the regions are read from

    fill?: string

    the region for the part of the track from the low end to the thumb; not drawn 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

    thumb: string

    the region for the thumb

    thumbHover?: string

    the region for the thumb under the pointer or while dragged; thumb if left out

    track: string

    the region for the whole track