Add start of ship editing grid
This commit is contained in:
parent
b88c0eb358
commit
2fbabc785e
16 changed files with 249 additions and 18 deletions
18
js/gui/item.mjs
Normal file
18
js/gui/item.mjs
Normal 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');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue