melonJS
    Preparing search index...

    Interface UIPanelSettings

    Everything UIPanel takes.

    interface UIPanelSettings {
        blocking?: boolean;
        bobAmplitude?: number;
        bobPeriod?: number;
        borderColor?: Paint | null;
        borderWidth?: number;
        fillColor?: Paint | null;
        height: number;
        radius?: number;
        width: number;
    }
    Index
    blocking?: boolean

    Whether the panel swallows pointer events aimed at what is behind it.

    true by default, which is what a dialog wants: a click on the panel, or on the dimmed scene it covers, must not reach the game underneath. Children are unaffected either way, because the dispatcher asks a child before the container holding it.

    Set false for a panel that is only a backdrop, such as a HUD frame drawn over a playfield that still has to receive clicks.

    bobAmplitude?: number

    How far the panel drifts up and down, in pixels. 0, the default, leaves it still.

    See UIPanel#bobAmplitude.

    bobPeriod?: number

    How long one full up and down cycle takes, in milliseconds.

    See UIPanel#bobPeriod.

    borderColor?: Paint | null

    drawn around the edge; null for none

    borderWidth?: number

    how thick that border is

    fillColor?: Paint | null

    The fill behind the children; null leaves it transparent.

    NOT backgroundColor, which a Container already has and which does something else entirely: that one is handed to clearColor and wipes the whole render target, so a panel setting it would repaint the screen. The name here matches ProgressBarSettings instead.

    height: number

    the panel's height, in pixels

    radius?: number

    corner radius; 0 is square

    width: number

    the panel's width, in pixels