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

    Interface IModalToolBeta

    interface IModalTool {
        id: string;
        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;
        unregisterInputBindings(): void;
    }
    Index

    Properties

    id: string

    Unique identifier for the 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

      Returns void

      Unregister all input binding for this tool.