|
Post by OddChild on Oct 9, 2006 8:14:09 GMT -5
check to see if an object is in the viewport... would be handy. Ex if graphics.onscreen = true then 'do smoething
endif
|
|
|
Post by Guilect on Oct 9, 2006 19:21:30 GMT -5
This will do the trick. (just adjust the screen resolution from 640 x 480 to whatever you use if needed)
Function onscreen(image) onscreen = True If graphics.getx(image) + graphics.getwidth(image) < 0 or _ graphics.getx(image) > 640 then onscreen = False end if If graphics.gety(image) + graphics.getheight(image) < 0 or _ graphics.gety(image) > 480 then onscreen = False end if end function
usage example: If onscreen(image1) then graphics.settext "onscreen", 10,130,Font1
|
|