I am trying to use the ncurses menu library to create a menu. I found some wonderful sample code online and it displays great on my screen, however I can't figure out how to select an option and have it go to a new menu or have it select a differen't function.
I would like to select the Enter as a Student option and then have that bring up another menu and from that menu I would like to select "Create a new application" and have that navigate into creating a new application. I really don't understand how to navigate this though. Any insight?
These are my Menu Options:
char choices[][30] = {
"Enter as a Student",
"Enter as a Teacher",
"Exit",
(char)NULL
};
This is my switch case:
while((c = wgetch(my_menu_win)) != KEY_F(8))
{ switch(c)
{ case KEY_DOWN:
menu_driver(my_menu, REQ_DOWN_ITEM);
break;
case KEY_UP:
menu_driver(my_menu, REQ_UP_ITEM);
break;
}
wrefresh(my_menu_win);
}