melonJS
    Preparing search index...

    Interface UITextButtonSkin

    The art of a skinned UITextButton: one atlas region name per state, plus the atlas and optional nine-slice insets from UISkin.

    Each region is drawn as a nine-slice, so the button can be any size. Every region named is looked up when the button is built, so a typo throws there.

    const skin = {
    atlas,
    normal: "green_button04",
    pressed: "green_button05",
    disabled: "grey_button04",
    };
    interface UITextButtonSkin {
        atlas: TextureAtlas;
        disabled?: string;
        hover?: string;
        insetx?: number;
        insety?: number;
        normal: string;
        pressed?: string;
    }

    Hierarchy (View Summary)

    Index

    the atlas the regions are read from

    disabled?: string

    the region drawn while disabled; normal at half opacity if left out

    hover?: string

    the region drawn under the pointer; normal 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

    normal: string

    the region drawn at rest; also sets the button's default size

    pressed?: string

    The region drawn while held down; normal if left out. When it is shorter than normal, as pressed art usually is, it is drawn lowered by the difference and the label moves down with it.