Add start of ship editing grid

This commit is contained in:
asraelite 2018-03-05 00:57:33 +00:00
parent b88c0eb358
commit 2fbabc785e
16 changed files with 249 additions and 18 deletions

18
js/gui/item.mjs Normal file
View file

@ -0,0 +1,18 @@
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) {
super(null, onclick, x, y, w, h);
this.image = module === null ? null : module.currentImage;
this.type = 'itemButton';
}
click() {
this.onclick('left');
}
rightClick() {
this.onclick('right');
}
}