@minecraft/server-editor
    Preparing search index...

    Interface IModalToolBeta

    interface IModalTool {
        id: string;
        isActive: boolean;
        onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
        bindPropertyPane(pane: IRootPropertyPane): void;
        registerKeyBinding(
            action: SupportedKeyboardActionTypes,
            binding: KeyBinding,
            info?: KeyBindingInfo,
        ): IRegisteredKeyBinding;
        registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
        registerMouseDragBinding(action: SupportedMouseActionTypes): void;
        registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
        setMouseIcon(mouseIcon: MouseCursorIconType | undefined): void;
        unregisterInputBindings(): void;
    }
    Index

    Properties

    id: string

    Unique identifier for the tool

    isActive: boolean

    Active state of the modal tool

    Provides lifecycle activation events for a modal tool

    Methods

    • Beta

      Parameters

      Returns void

      Binds a property pane to the tool. When the tool is selected, the pane's visibility updates. Only one pane can be bound at a time.

    • Beta

      Parameters

      Returns void

      Register an action to be called when mouse left/middle/right buttons are pressed or released.

    • Beta

      Parameters

      Returns void

      Register an action to be called when mouse is dragged while left mouse button is down.

    • Beta

      Parameters

      Returns void

      Register an action to be called when mouse wheel is scrolled.

    • Beta

      Parameters

      • mouseIcon: MouseCursorIconType | undefined

        The mouse cursor icon, or undefined to reset to default.

      Returns void

      Set the mouse cursor icon for this tool when it's active. The icon will only be visible when this tool is the currently selected tool.

    • Beta

      Returns void

      Unregister all input binding for this tool.