Add non-working menu buttons

This commit is contained in:
asraelite 2018-03-02 19:56:29 +00:00
parent 435b24cb6a
commit 6223b35536
6 changed files with 43 additions and 9 deletions

View file

@ -29,6 +29,10 @@ export default class GuiElement {
return [this.x, this.y, this.w, this.h];
}
get center() {
return [this.x + this.w / 2, this.y + this.h / 2];
}
posRelative({x = null, xc = 0, y = null, yc = 0, w = null, h = null}) {
if (x !== null) {
this.x = (this.parent.w * x) - (this.w * xc);