melonJS
    Preparing search index...

    Interface ProgressBarSettings

    Everything ProgressBar takes.

    interface ProgressBarSettings {
        bindEvent?: keyof Events;
        borderColor?: Paint | null;
        borderWidth?: number;
        direction?: ProgressBarDirection;
        fillColor?: Paint;
        font?: string;
        fontSize?: number;
        height: number;
        labelFillStyle?: Paint;
        labelFormat?: (value: number, ratio: number) => string;
        max?: number;
        min?: number;
        onChange?: (value: number, ratio: number) => void;
        padding?: number;
        radius?: number;
        showLabel?: boolean;
        trackColor?: Paint | null;
        value?: number;
        width: number;
    }
    Index
    bindEvent?: keyof Events

    an event to take the value from, instead of setting it by hand.

    The bar subscribes for as long as it exists and unsubscribes when it is destroyed, which is the point: a subscription that outlives what it drives is a listener writing into a freed object.

    borderColor?: Paint | null

    drawn around the track; null for none

    borderWidth?: number

    how thick that border is

    which edge the fill grows from

    fillColor?: Paint

    the fill itself. A Color is re-read every frame, so mutating the one you passed animates the bar

    font?: string

    the label's font family

    fontSize?: number

    the label's font size, in pixels

    height: number

    the bar's full height, in pixels

    labelFillStyle?: Paint

    the label's colour

    labelFormat?: (value: number, ratio: number) => string

    what the label says; the default is a rounded percentage

    max?: number

    the value that reads as full

    min?: number

    the value that reads as empty

    onChange?: (value: number, ratio: number) => void

    called whenever the value actually moves

    padding?: number

    how far the fill sits inside the track, per side

    radius?: number

    corner radius; 0 is square

    showLabel?: boolean

    draw a label over the bar

    trackColor?: Paint | null

    behind the fill; null leaves it hollow, showing whatever is behind

    value?: number

    where to start

    width: number

    the bar's full width, in pixels