This is for the love2d engine. Works with the latest version. Look at my intro to software project for some examples on how to use this
3 lines
182 B
Plaintext
3 lines
182 B
Plaintext
function gui:IsHovering()
|
|
return (love.mouse.getX() > self.x and love.mouse.getX() < self.x+self.width and love.mouse.getY() > self.y and love.mouse.getY() < self.y+self.height)
|
|
end |