Buttons...

Blitz3D Forums/Blitz3D Beginners Area/Buttons...

Kippykip(Posted 2013) [#1]
Dunno why I didn't ask this when I started but how do I make my image 'clickable' like a button so it can do something


RemiD(Posted 2013) [#2]
You can use buttons made with 2d graphics (image or line + rect + text)
or
You can use buttons made with 3d graphics (quad mesh + image)
and
check if the X,Y position of the mouse is above a button or not and check if the button 1 of the mouse has been pressed or not, and with this decide to activate the button or not.

An example with 2d graphics :
http://www.blitzbasic.com/codearcs/codearcs.php?code=2361

An example with 3d graphics :
http://www.blitzbasic.com/codearcs/codearcs.php?code=1194 (it just shows how to make and use quads)

others examples :
http://www.google.fr/#q=GUI+site%3Ablitzbasic.com%2Fcodearcs%2F


Kippykip(Posted 2013) [#3]
Thanks :D


Yasha(Posted 2013) [#4]
You might also want to take a look at Draw3D. It's a huge library, but one of the many things it includes is button functionality.


Yue(Posted 2013) [#5]
You might also want to take a look at Draw3D. It's a huge library, but one of the many things it includes is button functionality.


Yes!!