@minecraft
    正在准备搜索索引...

    接口 ButtonData实验性

    Data used to configure a button.

    interface ButtonData {
        label: string | ObservableString | ObservableUIRawMessage | UIRawMessage;
        onClick: () => void;
        options?: ButtonOptions;
    }
    索引

    属性

    The text label to display on the button.

    onClick: () => void

    A callback function that is invoked when the player clicks the button.

    options?: ButtonOptions

    Optional configuration for the button, such as a tooltip, disabled state, image, or visibility.