buttons

Blitz3D Forums/Blitz3D Beginners Area/buttons

uh ... if it's 1 button you can go mr.lame way:

asuming that mx and my are the mouse coords, and asuming that you leftclicked your mouse:


if mx>=rectx1 and mx <=rectx2 and my>=recty1 and my<= recty2
; 'button' pressed
endif

however.. I assume you've more objects on your screen that can be pressed or dragged (scrollbars), so you could put all these objects in an array.

Another way is that you take one of the 2d/3d GUI libraries available. However. it's less fun to do, and reading/understanding the source of someone else is -imo- a nightmare.