@minecraft
    Preparing search index...

    Interface IModalToolContainer

    interface IModalToolContainer {
        currentTools: IModalTool[];
        onSelectedToolChanged: EventSink<SelectedModalToolChangedEventPayload>;
        addTool(id: string, params: ModalToolCreationParameters): IModalTool;
        focusToolInputContext(): void;
        getSelectedToolId(): string;
        getSortOrder(): string[];
        removeTool(id: string): void;
        setSelectedToolId(id: string): void;
        setSortOrder(ids: string[]): void;
    }
    Index

    Properties

    currentTools: IModalTool[]

    Tools within this container.

    Provides events when the selected modal tool changes.

    Methods

    • Returns string[]

      Array of tool identifiers in sort order, or undefined if not set

      Returns the current sort order of tools.

    • Parameters

      • id: string

        Name of the tool to remove.

      Returns void

      Remove an existing tool by id from the tool container

    • Parameters

      • id: string

        Identifier of the tool

      Returns void

      Selects a tool in the container.

    • Parameters

      • ids: string[]

        Array of tool identifiers in the desired order, or undefined to clear

      Returns void

      Sets the sort order for tools in the container.