clik-engine API
    Preparing search index...

    Interface SpriteButtonConfig

    interface SpriteButtonConfig {
        color?: string;
        disabledTexture?: string;
        fontFamily?: string;
        fontSize?: string;
        height?: number;
        hoverTexture?: string;
        icon?: string;
        iconFrame?: string | number;
        iconPosition?: "left" | "right";
        iconSpacing?: number;
        nineSlice?: { bottom: number; left: number; right: number; top: number };
        onClick?: () => void;
        pressTexture?: string;
        text: string;
        textStroke?: string;
        textStrokeThickness?: number;
        texture: string;
        width?: number;
        x: number;
        y: number;
    }
    Index

    Properties

    color?: string
    disabledTexture?: string

    Texture key shown when disabled (falls back to texture).

    fontFamily?: string
    fontSize?: string
    height?: number
    hoverTexture?: string

    Texture key shown on pointer hover (falls back to texture).

    icon?: string

    Optional icon texture key rendered beside the label.

    iconFrame?: string | number
    iconPosition?: "left" | "right"

    Which side of the label the icon sits on (default 'left').

    iconSpacing?: number

    Gap in px between icon and label (default 8).

    nineSlice?: { bottom: number; left: number; right: number; top: number }

    If provided the background is rendered as a Phaser NineSlice that stretches cleanly to any size. When omitted the sprite is simply scaled via setDisplaySize.

    onClick?: () => void

    Click / tap callback.

    pressTexture?: string

    Texture key shown while pressed (falls back to texture).

    text: string
    textStroke?: string

    Text outline color for readability on dark/busy backgrounds.

    textStrokeThickness?: number

    Text outline thickness (default 0 — no stroke).

    texture: string

    Base texture key used for the unpressed/default state.

    width?: number
    x: number
    y: number