mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Menu bar for brush selection implemented.
This commit is contained in:
9
tilorswift/js/events/TilorswiftButtonTileClickedEvent.js
Normal file
9
tilorswift/js/events/TilorswiftButtonTileClickedEvent.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import TilorswiftEvent from "./TilorswiftEvent.js";
|
||||
|
||||
export default class TilorswiftButtonTileClickedEvent extends Event
|
||||
{
|
||||
constructor(button) {
|
||||
super(TilorswiftEvent.BUTTON_TILE_CLICKED);
|
||||
this.button = button;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
const TilorswiftEvent = {
|
||||
FIELD_CLICKED: 'fieldclicked',
|
||||
FIELD_ENTERED: 'fieldentered',
|
||||
FIELD_CLICKED: 'fieldClicked',
|
||||
FIELD_ENTERED: 'fieldEntered',
|
||||
BUTTON_TILE_CLICKED: 'buttonTileClicked',
|
||||
};
|
||||
|
||||
export default TilorswiftEvent;
|
||||
@@ -1,19 +1,18 @@
|
||||
import TilorswiftEvent from "./TilorswiftEvent.js";
|
||||
|
||||
export default class TilorswiftFieldClickedEvent extends CustomEvent
|
||||
export default class TilorswiftFieldClickedEvent extends Event
|
||||
{
|
||||
constructor(field)
|
||||
constructor(field, button)
|
||||
{
|
||||
super(
|
||||
TilorswiftEvent.FIELD_CLICKED,
|
||||
{
|
||||
detail: {field: field}
|
||||
}
|
||||
);
|
||||
console.log('So kommt der Scheiß hier rein: ' + button);
|
||||
super(TilorswiftEvent.FIELD_CLICKED);
|
||||
|
||||
this.field = field;
|
||||
this.button = button;
|
||||
}
|
||||
|
||||
getField()
|
||||
{
|
||||
return this.detail.field;
|
||||
return this.field;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user