[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with Glut and mouse
- To: linuxgames@sunsite.dk
- Subject: Problem with Glut and mouse
- From: voidstar <voidstar@tin.it>
- Date: Mon, 17 Jun 2002 13:04:51 +0200
- Delivered-To: archiver@seul.org
- Delivered-To: mailing list linuxgames@sunsite.dk
- Delivery-Date: Mon, 17 Jun 2002 07:04:10 -0400
- Mailing-List: contact linuxgames-help@sunsite.dk; run by ezmlm
- Reply-To: linuxgames@sunsite.dk
Hello all,
I've a problem using GLUT. I'm coding an arkanoid game
and I've attacched the right mouse button to the menu:
glutAttachMenu(GLUT_RIGHT_BUTTON);
The problem is that I would like that the game stops
when I press the right mouse button, so I added this:
void glutMouseEvent(int button, int state, int x, int y){
if((button==GLUT_RIGHT_BUTTON)&&(state==GLUT_DOWN))
stop=0;
else
if((button==GLUT_RIGHT_BUTTON)&&(state==GLUT_UP))
stop=1;
}
But this only works if I don't attach the right mouse button
to the menu. It seems that they cannot work together.
Is there any way to do it?
PS:Sorry for my bad english
bye,
Andrea
voidstar@tin.it