Control.Dialog
Control demo
You just saw it ;). Click here to
see it again.
Javascript source
Meteora.uses('Control.Dialog');
Meteora.onStart(
function() {
Dialog.prompt('Your password', {
// default value
'default': '1337h4x0r',
// action when the user presses OK
'onOk': function(dialog) {
if (this.value) {
Dialog.alert('Your password was: '+this.value);
dialog.close();
} else {
Dialog.alert('Please fill the blank');
}
},
// action when the user cancels the dialog
'onCancel': function(dialog) {
if (this.value) {
Dialog.alert('Please, empty the input first.');
} else {
Dialog.question('Are you sure to quit?', {
onYes: function(dialog){
dialog.close();
this.close();
}.bind(dialog)
});
}
}
});
}
);