Add instructions
This commit is contained in:
parent
60f77c36a9
commit
2959c39da7
10 changed files with 119 additions and 21 deletions
|
@ -46,9 +46,8 @@ export default class GuiElement extends Rect {
|
|||
// - Albert Einstein
|
||||
|
||||
posRelative({x = null, xc = 0, y = null, yc = 0, w = null, h = null}) {
|
||||
if (x !== null) {
|
||||
if (x !== null)
|
||||
this.x = (this.parent.w * x) - (this.w * xc) + this.parent.x;
|
||||
}
|
||||
if (y !== null)
|
||||
this.y = (this.parent.h * y) - (this.h * yc) + this.parent.y;
|
||||
if (w !== null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue