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

    Interface IDropdownPropertyItemBeta

    A property item which supports Dropdown properties

    interface IDropdownPropertyItem {
        enable: boolean;
        id: string;
        paneId: string;
        typeName: PropertyItemType;
        value: number;
        visible: boolean;
        getEntryByIndex(index: number): undefined | IDropdownPropertyItemEntry;
        getEntryByValue(value: number): undefined | IDropdownPropertyItemEntry;
        setTitle(title: undefined | LocalizedString): void;
        setTooltip(tooltip: undefined | LocalizedString): void;
        updateEntries(
            entries: IDropdownPropertyItemEntry[],
            newValue?: number,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    enable: boolean

    If the item is enabled in the UI.

    id: string

    Unique ID for the property item.

    paneId: string

    The parent pane id.

    The type name of the target property.

    value: number

    Current selected entry value of the property item list.

    visible: boolean

    If the item should be visible in the UI.

    Methods

    • Beta

      Parameters

      • index: number

        Index of the dropdown entry in the list.

      Returns undefined | IDropdownPropertyItemEntry

      Find a dropdown entry at an index in the dropdown list.

    • Beta

      Parameters

      • value: number

        Value of the dropdown entry in the list.

      Returns undefined | IDropdownPropertyItemEntry

      Find a dropdown entry with a specific value associated with property item.

    • Beta

      Parameters

      Returns void

      Updates title of the property item.

    • Beta

      Parameters

      Returns void

      Updates tooltip of the property item.

    • Beta

      Parameters

      • entries: IDropdownPropertyItemEntry[]

        New list of updated entries.

      • OptionalnewValue: number

        New value value to use for the dropdown.

      Returns void

      Update list of dropdown entries.