mwg API
    Preparing search index...

    Interface ButtonOptions

    interface ButtonOptions {
        colors?: ButtonColors;
        disabled?: boolean;
        height: number;
        icon?: Container<ContainerChild>;
        iconSelected?: Container<ContainerChild>;
        label?: Omit<LabelOptions, "text">;
        onClick?: () => void;
        onPress?: () => void;
        onRelease?: () => void;
        skin?: ButtonSkin;
        text?: string;
        tooltip?: string | (() => string);
        width: number;
    }
    Index
    colors?: ButtonColors

    Instance palette overrides; omitted fields continue following the active theme.

    disabled?: boolean
    height: number
    icon?: Container<ContainerChild>

    drawn to one side of the text, or centred alone if text is omitted

    iconSelected?: Container<ContainerChild>

    drawn instead of icon while the button is selected (setSelected): a two-icon toggle

    label?: Omit<LabelOptions, "text">

    Caption styling, also used when setText creates a caption later.

    onClick?: () => void
    onPress?: () => void

    fires on pointerdown, before onClick - the hook a virtual d-pad button needs to feed core.Input's pressTouch for hold-to-repeat movement, which a click-only callback cannot do

    onRelease?: () => void

    fires on pointerup or pointerupoutside, whether or not it completed a click - the pressTouch counterpart to onPress

    skin?: ButtonSkin

    Per-button chrome, independent of the window theme. Textures remain caller-owned.

    text?: string

    the button's caption; omit for an icon-only button, the shape a title screen's rankings/badges/settings buttons usually take

    tooltip?: string | (() => string)

    What a tooltip should say about this button, as text or a function asked each time (so it can name why the button is disabled). The button only holds it: a TooltipHost reads tooltip.

    width: number