Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. void createMenu(void){
  2. //////////
  3. // MENU //
  4. //////////
  5.  
  6. // Create a submenu, this has to be done first.
  7. menuSegment = glutCreateMenu(menu);
  8.  
  9. // Add sub menu entry
  10. glutAddMenuEntry("Blanc", 1);
  11. glutAddMenuEntry("Rouge", 2);
  12. glutAddMenuEntry("Vert", 3);
  13. glutAddMenuEntry("Bleu", 4);
  14.  
  15. menuCercle = glutCreateMenu(menu);
  16.  
  17. glutAddMenuEntry("Blanc", 5);
  18. glutAddMenuEntry("Bleu", 6);
  19. glutAddMenuEntry("Vert", 7);
  20. glutAddMenuEntry("Rouge", 8);
  21.  
  22. menuCarre = glutCreateMenu(menu);
  23.  
  24. glutAddMenuEntry("Blanc", 9);
  25. glutAddMenuEntry("Bleu", 10);
  26. glutAddMenuEntry("Vert", 11);
  27. glutAddMenuEntry("Rouge", 12);
  28.  
  29. menuEllipse = glutCreateMenu(menu);
  30.  
  31. glutAddMenuEntry("Blanc", 13);
  32. glutAddMenuEntry("Bleu", 14);
  33. glutAddMenuEntry("Vert", 15);
  34. glutAddMenuEntry("Rouge", 16);
  35.  
  36. menuArcDeCercle = glutCreateMenu(menu);
  37.  
  38. glutAddMenuEntry("Blanc", 17);
  39. glutAddMenuEntry("Bleu", 18);
  40. glutAddMenuEntry("Vert", 19);
  41. glutAddMenuEntry("Rouge", 20);
  42.  
  43. // Create the menu, this menu becomes the current menu
  44. quit = glutCreateMenu(menu);
  45.  
  46. // Create an entry
  47. glutAddSubMenu("Segment", menuSegment);
  48. glutAddSubMenu("Cercle", menuCercle);
  49. glutAddSubMenu("Carre", menuCarre);
  50. glutAddSubMenu("Ellipse", menuEllipse);
  51. glutAddSubMenu("ArcDeCercle", menuArcDeCercle);
  52.  
  53. // Create an entry
  54. glutAddMenuEntry("Quitter", 0);
  55.  
  56. // Let the menu respond on the right mouse button
  57. glutAttachMenu(GLUT_RIGHT_BUTTON);
  58.  
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement