Advertisement Jump to content
Sign in to follow this  

[SOLVED]Problem with glutmousefunc

This topic is 4230 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
I solved it!!!! the problem was here!!!!!

i fix it using!!!!!

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

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!