神岛 API 文档 - ArenaPro版
    Preparing search index...

    Interface GUIBindDefinition<T>

    定义 GUI 绑定的具体行为。

    Defines the specific behavior for a GUI binding.

    interface GUIBindDefinition<T> {
        clipboardWrite: { attributeName: string; targetSelector: string };
        drag: {
            attributes: { [name: string]: "x" | "-x" | "y" | "-y" };
            targetSelector: string;
        };
        remove: { targetSelector: string };
        sendMessage: { messageData?: string[]; messageName: string };
        show: { allowMultiple?: boolean; name: T };
    }

    Type Parameters

    • T
    Index

    Properties

    clipboardWrite: { attributeName: string; targetSelector: string }

    Type declaration

    • attributeName: string

      要写入剪贴板的属性名称。

      The name of the attribute to write to the clipboard.

    • targetSelector: string

      从中获取数据的目标元素的 CSS 选择器。

      The CSS selector for the target element to get data from.

    定义写入剪贴板行为。

    Defines the clipboard write behavior.

    drag: {
        attributes: { [name: string]: "x" | "-x" | "y" | "-y" };
        targetSelector: string;
    }

    Type declaration

    • attributes: { [name: string]: "x" | "-x" | "y" | "-y" }

      将 DOM 元素的属性映射到拖动方向。

      Maps attributes of a DOM element to drag directions.

    • targetSelector: string

      要应用拖动效果的目标元素的 CSS 选择器。

      The CSS selector for the target element to apply the drag effect to.

    定义拖动行为。

    Defines the drag behavior.

    remove: { targetSelector: string }

    Type declaration

    • targetSelector: string

      要移除的目标元素的 CSS 选择器。

      The CSS selector for the target element to remove.

    定义移除行为。

    Defines the remove behavior.

    sendMessage: { messageData?: string[]; messageName: string }

    Type declaration

    • OptionalmessageData?: string[]

      要发送的消息数据。

      The message data to send.

    • messageName: string

      要发送的消息的名称。

      The name of the message to send.

    定义发送消息行为。

    Defines the send message behavior.

    show: { allowMultiple?: boolean; name: T }

    Type declaration

    • OptionalallowMultiple?: boolean

      是否允许多个实例。

      Whether to allow multiple instances.

    • name: T

      要显示的元素的名称。

      The name of the element to show.

    定义显示行为。

    Defines the show behavior.