UIElement.prototype.atPos = function(x, y) {
    if(x >= this.drawX && y >= this.drawY && x <= this.drawX+this.width && y <= this.drawY+this.height) {
        return true;
    }
    return false;