Dialogs and function for new terrain.

This commit is contained in:
Mal
2020-02-10 19:36:46 +01:00
parent f6890eec24
commit b58cb552c8
7 changed files with 79 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
import Dialog from "./Dialog.js";
import TilorswiftNewTerrainEvent from "../events/TilorswiftNewTerrainEvent.js";
export default class DialogNewTerrain extends Dialog
{
constructor() {
super();
this.setMessage('Neues Terrain erstellen');
this.inputRows = this.createInputNumber('Zeilen');
this.inputColumns = this.createInputNumber('Spalten');
this.buttonCancel = this.createButton('Abbrechen');
this.buttonCreate = this.createButton('Erstellen');
this.buttonCreate.addEventListener(
'click',
() => {
window.dispatchEvent(
new TilorswiftNewTerrainEvent(
'/mr-crocs-adventures/graphics/tileset-landscape01.jpg', /* TODO */
this.inputColumns.value,
this.inputRows.value
)
)
}
);
}
}