Blockbench Reference Docs
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    buttons?: string[]
    cancel_on_click_outside: boolean
    cancelIndex: number
    component?: Component
    configuration: DialogOptions
    confirmIndex: number
    content_vue: any
    darken: boolean
    draggable: boolean
    form?: InputForm
    form_config: InputFormConfig
    form_first?: boolean
    id: string
    keyboard_actions?: {
        [id: string]: {
            condition?: any;
            keybind: Keybind;
            run: (event: KeyboardEvent) => void;
        };
    }
    lines?: DialogLineOptions[]
    max_label_width?: number
    object: HTMLElement
    onBuild: (object: HTMLElement) => void
    onOpen: () => void
    onResize: () => void
    options: { [key: string]: FormResultValue }
    part_order?: string[]
    progress_bar?: {
        node?: HTMLDivElement;
        progress?: number;
        setProgress(value: number): void;
    }

    Type Declaration

    • Optionalnode?: HTMLDivElement

      The progress bar HTML node

    • Optionalprogress?: number

      The current progress

    • setProgress: function
      • Set the progress displayed in the progress bar

        Parameters

        • value: number

          A progress value between 0 and 1

        Returns void

    resizable?: false | "x" | "y" | "xy"
    sidebar?: DialogSidebar
    singleButton?: boolean
    title: string
    title_menu?: Menu
    toolbars: Record<string, Toolbar>
    uses_wide_inputs?: boolean
    width: number
    open: Dialog

    Currently opened dialog

    stack: Dialog[]

    Stack of currently open dialogs, ordered by depth

    Methods

    • Returns this

    • Triggers the cancel event of the dialog.

      Parameters

      Returns void

    • Change and save a number of options in the config

      Parameters

      • options: Record<string, FormResultValue>

        Options to set

      Returns this

    • Returns void

    • Triggers the confirm event of the dialog.

      Parameters

      Returns void

    • Returns void

    • Returns void

    • Parameters

      • form_id: string

      Returns JQuery<HTMLElement>

    • Returns { [x: string]: FormResultValue }

    • Returns this

    • Parameters

      • button_index: number
      • Optionalevent: Event

      Returns boolean | void

    • Parameters

      Returns boolean | void

    • Parameters

      • formResult: any
      • event: Event

      Returns boolean | void

    • Parameters

      • form_result: { [key: string]: FormResultValue }

      Returns void

    • Save any changes in local storage

      Returns this

    • Set whether the dialog form inputs are toggled on or off. See "toggle_enabled"

      Parameters

      • values: Record<string, boolean>
      • Optionalupdate: boolean

        Whether to update the dialog (call onFormChange) after setting the values. Default is true. Set to false when called from onFormChange

      Returns void

    • Set the values of the dialog form inputs

      Parameters

      • values: Record<string, FormResultValue>

        The values to set, by form input key

      • Optionalupdate: boolean

        Whether to update the dialog (call onFormChange) after setting the values. Default is true. Set to false when called from onFormChange

      Returns void

    • Open the config menu

      Parameters

      • Optionalanchor: HTMLElement

        Optional element to anchor the menu to

      Returns this

    • Parameters

      • Optionalinitial: boolean

      Returns { [x: string]: FormResultValue }