Hi i am making a 2d thing and i'm trying to get it so when i click on one image another will apear till i click on it again or if i click off it but i dont know how plese help me.
please reply soon
please reply soon
If Mousedown(1) then If ImagesOverlap (pointer,MouseX(),MouseY(),button,0,711) then . .
if the left button mouse has been pressed then if it has been pressed on an image then change status to the image flag endif endif And, in the main loop: if the image status is 1 then display it . . flip wend
my_img = LoadImage("popup.png") my_img_status = 0 my_imgx = 100 my_imgy = 100 . . if mousehit(1) then ;left mouse click ? flushmouse() ;reset mouse if imagesoverlap(mouse_img,mousex(),mousey(),button,buttonx,buttony) then my_img_status = 1 - my_img_status ;this will toggle between 0 and 1 endif endif ; ; if my_img_status = 1 then drawimage my_img,my_imgx,my_imgy endif flip wend
if mousehit(1) then ;left mouse click ? flushmouse() ;reset mouse if imagesoverlap(mouse_img,mousex(),mousey(),button,buttonx,buttony) then my_img_status = 1 - my_img_status ;this will toggle between 0 and 1 endif endif