mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Dialogs and function for new terrain.
This commit is contained in:
27
tilorswift/js/dialog/DialogNewTerrain.js
Normal file
27
tilorswift/js/dialog/DialogNewTerrain.js
Normal 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
|
||||
)
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user