mDown(e){
        // positions of the mouse
        // taking mouse position relative to the top point of the canvas and giving that to the x/yMouseStar
        this.xMouseStart = e.offsetX;
        this.yMouseStart = e.offsetY;
        //this.update()
        // reset w and h to 0 
        this.w = 0;
        this.h = 0;
        // when mouse goes down it stays down
        //this.mouseDown = true;
        //defining the inbounds and setting
        // only set mousedown to true if they have clicked inside the boundary
        if (this.inBoundsCheck(this.xMouseStart, this.yMouseStart, this.Dx, this.Dy, this.Dw, this.Dh)){
            this.mouseDown = true;
        }
        //console.log(this.inBounds)
        //console.log(Button.Shape)
        
        //console.log("down")
        //console.log(this.w)
        //console.log(this.h)
    }
// this function is called when the user has clicked down
this function is called when the user has clicked down
this function is called when the user has clicked down
mDown(e){
        this.xMouseStart = e.offsetX;
        this.yMouseStart = e.offsetY;
        this.w = 0;
        this.h = 0;
        if (this.inBoundsCheck(this.xMouseStart, this.yMouseStart, this.Dx, this.Dy, this.Dw, this.Dh)){
            this.mouseDown = true;
        }
    }
mDown ( e ) { this . xMouseStart = e . offsetX ; this . yMouseStart = e . offsetY ; this . w = 0 ; this . h = 0 ; if ( this . inBoundsCheck ( this . xMouseStart , this . yMouseStart , this . Dx , this . Dy , this . Dw , this . Dh ) ) { this . mouseDown = true ; } }
this function is called when the user has clicked down
this function is called when the user has clicked down
// positions of the mouse // taking mouse position relative to the top point of the canvas and giving that to the x/yMouseStar //this.update() // reset w and h to 0  // when mouse goes down it stays down //this.mouseDown = true; //defining the inbounds and setting // only set mousedown to true if they have clicked inside the boundary //console.log(this.inBounds) //console.log(Button.Shape) //console.log("down") //console.log(this.w) //console.log(this.h)