Add start of ship editing grid
This commit is contained in:
parent
b88c0eb358
commit
2fbabc785e
16 changed files with 249 additions and 18 deletions
|
@ -9,10 +9,15 @@ export class Rect {
|
|||
|
||||
this.onclick = null;
|
||||
this.mouseHeld = false;
|
||||
|
||||
this.rightMouseHeld = false;
|
||||
this.onRightClick = null;
|
||||
}
|
||||
|
||||
click() {}
|
||||
|
||||
rightClick() {}
|
||||
|
||||
tickMouse() {
|
||||
if (this.mouseHeld == true && !input.mouse.held[0] && this.mouseOver)
|
||||
this.click();
|
||||
|
@ -20,6 +25,14 @@ export class Rect {
|
|||
this.mouseHeld = true;
|
||||
if (!input.mouse.held[0])
|
||||
this.mouseHeld = false;
|
||||
|
||||
if (this.rightMouseHeld == true && !input.mouse.held[2]
|
||||
&&this.mouseOver)
|
||||
this.rightClick();
|
||||
if (!this.rightMouseHeld && input.mouse.pressed[2] && this.mouseOver)
|
||||
this.rightMouseHeld = true;
|
||||
if (!input.mouse.held[2])
|
||||
this.rightMouseHeld = false;
|
||||
}
|
||||
|
||||
get shape() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue