DexTool/Project/objects/obj_button/Step_0.gml
2020-03-01 18:30:44 -06:00

22 lines
344 B
Plaintext

if (mouse_x>x && mouse_x<x+width && mouse_y>y && mouse_y<y+height)
{
hover = true;
color = c_red;
if (mouse_check_button_pressed(mb_left))
pressed = true;
}
else
{
hover = false;
color = c_white;
}
if (mouse_check_button_released(mb_left))
{
if (hover)
button_do(type);
pressed = false;
}