Add inventory
This commit is contained in:
parent
548fb99c8b
commit
469121e18a
8 changed files with 200 additions and 22 deletions
|
@ -2,11 +2,16 @@ import * as gui from './index.mjs';
|
|||
import GuiButton from './button.mjs';
|
||||
|
||||
export default class GuiItemButton extends GuiButton {
|
||||
constructor(tile, onclick, x, y, w = 50, h = 50) {
|
||||
constructor(tile, onclick, x, y, w = 50, h = 50, { padding, selected } = {
|
||||
padding: 0,
|
||||
selected: false
|
||||
}) {
|
||||
super(null, onclick, x, y, w, h);
|
||||
this.module = tile.module;
|
||||
this.image = tile.image;
|
||||
this.type = 'itemButton';
|
||||
this.padding = padding;
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
click() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue