From e32b8f09fb0f66300cee8a23e719a57f4b247f7a Mon Sep 17 00:00:00 2001 From: dcnieho Date: Sat, 21 Jul 2012 03:58:04 +0000 Subject: [PATCH] better test of menus: one window now has right and left click menus git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1353 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/progs/demos/One/one.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freeglut/freeglut/progs/demos/One/one.c b/freeglut/freeglut/progs/demos/One/one.c index 1b35f43..ee62c81 100644 --- a/freeglut/freeglut/progs/demos/One/one.c +++ b/freeglut/freeglut/progs/demos/One/one.c @@ -296,6 +296,8 @@ int main( int argc, char** argv ) glutSpecialFunc( SampleSpecial ); glutIdleFunc( SampleIdle ); glutAttachMenu( GLUT_LEFT_BUTTON ); + glutSetMenu(subMenuA); + glutAttachMenu( GLUT_RIGHT_BUTTON); printf( "Testing game mode string parsing, don't panic!\n" ); glutGameModeString( "320x240:32@100" ); @@ -316,7 +318,6 @@ int main( int argc, char** argv ) glutReshapeFunc( SampleReshape ); glutKeyboardFunc( SampleGameModeKeyboard ); glutIdleFunc( SampleIdle ); - glutAttachMenu( GLUT_LEFT_BUTTON ); printf( "current window is %ix%i at (%i,%i)\n", glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT ),