Chaser
Member
any reason why this isn't working for me? one works one doesn't, same thing, very annoying.
obj_display
Create event:
global.download = false;
global.download2 = false;
Step Event:
mousex = window_mouse_get_x();
mousey = window_mouse_get_y();
Draw_GUI Event:
draw_rectangle_color(550,740,750,706,c_white,c_red,c_green,c_blue,false);
if point_in_rectangle(mousex, mousey,550,740,750,706)
{
global.download = true;
}
else
if !point_in_rectangle(mousex, mousey,550,740,750,706)
{
global.download = false;
}
Draw_event:
draw_set_font(font0);
draw_set_colour(c_white)
draw_text(0,0,"" +string(global.download);
draw_text(0,10,"" +string(global.download2);
Above code works
Below code doesn't
draw_rectangle_color(114,128,180,146,c_white,c_red,c_green,c_blue,false);
if point_in_rectangle(mousex, mousey,114,128,180,146)
{
global.download2 = true;
}
else
if !point_in_rectangle(mousex, mousey,114,128,180,146)
{
global.download2 = false;
}
I find it weird, maybe i'm missing something.
Rectangle boxes are drawn fine, even when i display the co-ordinates of the mouse X & Y on screen, it shows that its inside the rectangle, but just doesn't register like the first box. I'm baffled.
obj_display
Create event:
global.download = false;
global.download2 = false;
Step Event:
mousex = window_mouse_get_x();
mousey = window_mouse_get_y();
Draw_GUI Event:
draw_rectangle_color(550,740,750,706,c_white,c_red,c_green,c_blue,false);
if point_in_rectangle(mousex, mousey,550,740,750,706)
{
global.download = true;
}
else
if !point_in_rectangle(mousex, mousey,550,740,750,706)
{
global.download = false;
}
Draw_event:
draw_set_font(font0);
draw_set_colour(c_white)
draw_text(0,0,"" +string(global.download);
draw_text(0,10,"" +string(global.download2);
Above code works
Below code doesn't
draw_rectangle_color(114,128,180,146,c_white,c_red,c_green,c_blue,false);
if point_in_rectangle(mousex, mousey,114,128,180,146)
{
global.download2 = true;
}
else
if !point_in_rectangle(mousex, mousey,114,128,180,146)
{
global.download2 = false;
}
I find it weird, maybe i'm missing something.
Rectangle boxes are drawn fine, even when i display the co-ordinates of the mouse X & Y on screen, it shows that its inside the rectangle, but just doesn't register like the first box. I'm baffled.
Last edited: