GLUT mouse clicks detection -


i designed picture , set background window. want bits of picture act buttons, example if use screenshot of desktop background image window, make start button act button, have draw area defines perimeter clicks of mouse have particular action?

well, glut drawing, it's not meant create buttons or menus. best solution keep areas want have button in variable , test if mouse click inside 1 of these areas.

example rectangle:

if(mouse_x>vertex_x[0] && mouse_x<vertex_x[1] && mouse_y>vertex_y[0] && mouse_y<vertex_y[1]) 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -