Add right click edit grid interaction

This commit is contained in:
asraelite 2018-03-05 11:10:20 +00:00
parent 2fbabc785e
commit 548fb99c8b
9 changed files with 65 additions and 28 deletions

View file

@ -2,9 +2,10 @@ import * as gui from './index.mjs';
import GuiButton from './button.mjs';
export default class GuiItemButton extends GuiButton {
constructor(module, onclick, x, y, w = 50, h = 50) {
constructor(tile, onclick, x, y, w = 50, h = 50) {
super(null, onclick, x, y, w, h);
this.image = module === null ? null : module.currentImage;
this.module = tile.module;
this.image = tile.image;
this.type = 'itemButton';
}