Improve inventory
This commit is contained in:
parent
ee5ab45cfb
commit
27c6a8bcd0
12 changed files with 99 additions and 17 deletions
|
@ -26,6 +26,12 @@ export default class GuiElement extends Rect {
|
|||
|
||||
}
|
||||
|
||||
get drawn() {
|
||||
if (!this.options.drawChildren) return false;
|
||||
if (!this.parent) return true;
|
||||
return this.parent.drawn;
|
||||
}
|
||||
|
||||
append(element) {
|
||||
this.children.add(element);
|
||||
element.parent = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue