}\r
\r
int makeSubmenuFromArray( const char *menuEntries[], void *callback ) {\r
- for ( int i = 0; i < 54; i++ ) {\r
- printf("%s\n", menuEntries[i]);\r
- }\r
- /* int menuEntriesSize = sizeof(menuEntries) / sizeof(menuEntries[0]);\r
+ int menuEntriesSize = 54;//sizeof(menuEntries) / sizeof(menuEntries[0]);\r
int menuNumber = menuEntriesSize / 10 + 1;\r
int submenuObjects[menuNumber-1];\r
\r
int startNum = i*11 - (i-1);\r
int endNum = startNum + 9;\r
if ( i == menuNumber - 1 ) { // We're on the last one\r
- endNum = startNum + 3;\r
+ endNum = startNum + (menuEntriesSize - startNum);\r
}\r
sprintf(name, "%d-%d", startNum, endNum);\r
glutAddSubMenu( name, submenuObjects[i] );\r
}\r
\r
- return mainMenu;*/\r
- return 1;\r
+ return mainMenu;\r
}\r
\r
void makeMenu() {\r