Add start of ship editing

This commit is contained in:
asraelite 2018-03-04 16:49:42 +00:00
parent d85338d9f2
commit b88c0eb358
18 changed files with 288 additions and 100 deletions

View file

@ -1,7 +1,8 @@
import {Rect} from './misc.mjs';
const defaultOptions = {
draw: true // Whether the element itself will be rendered.
draw: true, // Whether the element itself will be rendered.
drawChildren: true // Whether children will be rendered.
}
export default class GuiElement extends Rect {
@ -15,9 +16,14 @@ export default class GuiElement extends Rect {
this.options = Object.assign({}, defaultOptions, options);
}
tick() {
tickElement() {
this.tickMouse();
this.children.forEach(c => c.tick());
this.tick();
this.children.forEach(c => c.tickElement());
}
tick() {
}
append(element) {