Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. menu_t mainmenu = {
  2.     3,
  3.     (menuitem_t[]) {
  4.         { "Catalog", MENU_DEFAULT, &catalog, 0, NULL },
  5.         { "Screen 0", MENU_DEFAULT, NULL,
  6.             3,
  7.             (menuitem_t[]) {
  8.                 { "Screen 0", MENU_DEFAULT, &select_shell0, 0, NULL },
  9.                 { "Screen 1", MENU_DEFAULT, &select_shell1, 0, NULL },
  10.                 { "Screen 2", MENU_DEFAULT, &select_shell2, 0, NULL },
  11.             }
  12.         },
  13.         { "System", MENU_DEFAULT | MENU_RIGHTALIGN, NULL,
  14.             6,
  15.             (menuitem_t[]) {
  16.                 { "Memory Management", MENU_DEFAULT, NULL, 0, NULL },
  17.                 { "OS Debugger",       MENU_DEFAULT, NULL, 0, NULL },
  18.                 { "Network Settings",  MENU_DEFAULT, NULL, 0, NULL },
  19.                 { "About",             MENU_DEFAULT, NULL, 0, NULL },
  20.                 { "Reboot",            MENU_DEFAULT, NULL, 0, NULL },
  21.                 { "Poweroff",          MENU_DEFAULT, NULL, 0, NULL },
  22.             }
  23.         },
  24.     },
  25. };
  26.  
  27. // ...
  28. catalog_result = NULL;
  29. menuitem_t *selection = menu_open(&mainmenu);
  30. if(catalog_result != NULL)
  31. {
  32.     char const * str = catalog_result;
  33.     while(*str) {
  34.     putc(*str);
  35.     currshell.input[currshell.cursor++] = *str++;
  36. }
  37. // ..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement