Initializes a new instance of the Dialog class.
Namespace: MindFusion.Common.UI
File: Dialog.js
JavaScript Copy Code |
---|
function Dialog (parent) |
HTMLElement. The DOM element to which to append the dialog.
You would either inherit from this class to create your own dialogs or use one of the methods of the Dialog class, which render one of the predefined dialogs. You can also create instances of one of the classes that implement Dialog: ConfirmDialog, InfoDialog, InputDialog.
The following code creates an input dialog:
JavaScript Copy Code |
---|
// show the dialog ui.Dialogs.showInputDialog("", "Choose game mode", startGame, document.getElementById("content"), select, "value"); |