• Advertisement
Sign in to follow this  

[SOLVED]Problem with glutmousefunc

This topic is 3961 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

well the problem here is that dosent matter the place i make de clik it display the texture. It suposed to do that only if the mouse is in the limits. here is the code!!!!!
void mouse(int button, int state, int Cx, int Cy){
if (button==GLUT_LEFT_BUTTON&&0<=Cx<=w&&h<=Cy<=3*h&&state==GLUT_UP) {d=1;LED(w*lalp[1]-w,h,w*lalp[1] ,3*h,texamb[1]);
DrawText(w*lalp[1]-w+2, 2*h-5, "ARMED",1.0, 1.0, 1.0);}
}


for debug i use cout. for print the coords and them are show ok!!!! [Edited by - mesor on June 21, 2007 10:45:11 PM]

Share this post


Link to post
Share on other sites
Advertisement
I solved it!!!! the problem was here!!!!!
0<Cx<h

i fix it using!!!!!
0<Cx&&Cx<h

i dont know if there is another way but this works!!!!!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement