Loading of levels is working now

This commit is contained in:
Mal
2023-09-18 22:33:55 +02:00
parent 349792f916
commit aeece9731c
11 changed files with 347 additions and 271 deletions

View File

@@ -7,13 +7,8 @@ export class LoadLevelDialog extends Dialog
this.setMessage('Level laden');
this.fileInput = this.createFileInput(['json']);
this.onClose = () => {};
this.onLoad = () => {};
this.buttonLoad = this.createButton('Laden');
this.buttonLoad.addEventListener(
'click',
this.fileInput.addEventListener(
'change',
() => {
if (this.fileInput.files.length === 0) {
return;
@@ -29,7 +24,9 @@ export class LoadLevelDialog extends Dialog
)
reader.readAsBinaryString(this.fileInput.files[0]);
}
);
)
this.onClose = () => {};
this.onLoad = () => {};
this.buttonCancel = this.createButton('Abbrechen');
this.buttonCancel.addEventListener(