mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Basic dialog classes implemented.
This commit is contained in:
18
tilorswift/js/dialog/DialogNotification.js
Normal file
18
tilorswift/js/dialog/DialogNotification.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import Dialog from "./Dialog.js";
|
||||
|
||||
export default class DialogNotification extends Dialog
|
||||
{
|
||||
constructor(message, callback = function () {})
|
||||
{
|
||||
super();
|
||||
this.buttonOk = this.createButton('OK');
|
||||
this.buttonOk.addEventListener(
|
||||
'click',
|
||||
() => {
|
||||
callback();
|
||||
this.htmlElement.remove();
|
||||
}
|
||||
);
|
||||
this.setMessage(message)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user