All you gotta do is utilize the following builtin variables:
int mouse.x, mouse.y; // The mouse's location on screen.
int mouse.l, mouse.m, mouse.r; // The button states, updated on ShowPage().
int mouse.w; // The wheel mouse, seems that scrolls are in offsets of 120.
Then use the following code to tell if the mouse is inside a rectangular area:
// Check for mouse within rectangular area
int DetectMouseCollision(int x1, int y1, int x2, int y2)
// Pass: the top left x1,y1 and bottom right x2,y2 coords of the rectangle
// Return: True if the mouse is within the rectangle, false if it is not
// Credit: Overkill
{
return (mouse.x >= x1 && mouse.x <= x2 && mouse.y >= y1 && mouse.y <= y2);
}
Then do something fun like:
if (DetectMouseCollision(30, 30, 60, 60))
{
DrawHoverButton(30, 30, 60, 60);
if (mouse.l)
{
PRESBUTANLOL()
}
}
else
{
DrawButton(30, 30, 60, 60);
}