Interface
Messages
Blockbench.showMessageBox( options, cb )
Shows a simple message box with a title, message, an icon and buttons
optionsObjectbuttonsArray or strings used to generate the buttonsconfirmIndex of the button used to confirm the dialogcancelIndex of the button used to cancel the dialogtranslateKeyTranslation key used to auto-fill the title and message from translationstitleDialog TitlemessageDialog contenticonIcon string, see #IconswidthDialog width in pixels
callbackCalled when the user exits the dialog using the buttons.resultArgument, the index of the clicked button within the buttons array.
Blockbench.textPrompt( title, value, callback )
Prompts the user to enter or edit a text.
titleDialog titlevalueBefore value of the textcallbackRuns when the user confirms the prompttextOnly parameter, the text entered by the user
Blockbench.showToastNotification( options: Object )
Displays a notification at the top of the 3D viewport.
optionstext: StringText messageicon: Icon StringToast Iconcolor: CSS Color StringBackground color of the toastexpire: IntegerTime in miliseconds before the notification disappearsclick: FunctionMethod to run on click
Blockbench.showQuickMessage( message[, time] )
Displays a quick message in the middle of the Blockbench interface
messageMessage to display. Can be a translation stringtimeHow long to display the message in miliseconds. Defaults to 1000 miliseconds.
Blockbench.showStatusMessage( message[, time] )
Displays a message in the status bar of Blockbench.
messageMessage to display. Can be a translation stringtimeHow long to display the message in miliseconds. Defaults to 1000 miliseconds.
Blockbench.setStatusBarText( text )
Sets a text to the status bar
textText to display. If undefined, it will return to the old value.
Blockbench.notification( title, text[, icon])
Displays a push notification. In browsers, the user has to accept notifications first.
titleNotification titletextNotification contenticonNotification icon, defaults to the Blockbench icon
Miscellaneous
Blockbench.setProgress( progress )
Sets the progress bar below the status bar and in the taskbar/dock.
progressProgress (0 is empty, 1 is full)
Blockbench.openLink( link )
Opens a link in an external browser window or new tab.