Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void createMenu(void){
- //////////
- // MENU //
- //////////
- // Create a submenu, this has to be done first.
- menuSegment = glutCreateMenu(menu);
- // Add sub menu entry
- glutAddMenuEntry("Blanc", 1);
- glutAddMenuEntry("Rouge", 2);
- glutAddMenuEntry("Vert", 3);
- glutAddMenuEntry("Bleu", 4);
- menuCercle = glutCreateMenu(menu);
- glutAddMenuEntry("Blanc", 5);
- glutAddMenuEntry("Bleu", 6);
- glutAddMenuEntry("Vert", 7);
- glutAddMenuEntry("Rouge", 8);
- menuCarre = glutCreateMenu(menu);
- glutAddMenuEntry("Blanc", 9);
- glutAddMenuEntry("Bleu", 10);
- glutAddMenuEntry("Vert", 11);
- glutAddMenuEntry("Rouge", 12);
- menuEllipse = glutCreateMenu(menu);
- glutAddMenuEntry("Blanc", 13);
- glutAddMenuEntry("Bleu", 14);
- glutAddMenuEntry("Vert", 15);
- glutAddMenuEntry("Rouge", 16);
- menuArcDeCercle = glutCreateMenu(menu);
- glutAddMenuEntry("Blanc", 17);
- glutAddMenuEntry("Bleu", 18);
- glutAddMenuEntry("Vert", 19);
- glutAddMenuEntry("Rouge", 20);
- // Create the menu, this menu becomes the current menu
- quit = glutCreateMenu(menu);
- // Create an entry
- glutAddSubMenu("Segment", menuSegment);
- glutAddSubMenu("Cercle", menuCercle);
- glutAddSubMenu("Carre", menuCarre);
- glutAddSubMenu("Ellipse", menuEllipse);
- glutAddSubMenu("ArcDeCercle", menuArcDeCercle);
- // Create an entry
- glutAddMenuEntry("Quitter", 0);
- // Let the menu respond on the right mouse button
- glutAttachMenu(GLUT_RIGHT_BUTTON);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement