hovered

returns true or false for if the mouse is over the button

Examples



const button = $.makeButton($.w/2, $.h/2, 150, 50, "Not hovered!");
let timer = 0;

function update() {
    button.draw();

    if (button.hovered) {
        button.label = "Hovered!";
    } else {
        button.label = "Not hovered!";
    }
}