Added a no menus option to the test program.

This commit is contained in:
Pietro Gagliardi 2015-05-03 16:46:50 -04:00
parent 4eaa3ac574
commit c3cfb3fe09
1 changed files with 6 additions and 2 deletions

View File

@ -30,10 +30,13 @@ int main(int argc, char *argv[])
const char *err; const char *err;
uiWindow *w; uiWindow *w;
uiBox *page2; uiBox *page2;
int nomenus = 0;
memset(&o, 0, sizeof (uiInitOptions)); memset(&o, 0, sizeof (uiInitOptions));
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{//TODO else { if (strcmp(argv[i], "nomenus") == 0)
nomenus = 1;
else {
fprintf(stderr, "%s: unrecognized option %s\n", argv[0], argv[i]); fprintf(stderr, "%s: unrecognized option %s\n", argv[0], argv[i]);
return 1; return 1;
} }
@ -45,7 +48,8 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
initMenus(); if (!nomenus)
initMenus();
w = newWindow("Main Window", 320, 240, 1); w = newWindow("Main Window", 320, 240, 1);
uiWindowOnClosing(w, onClosing, NULL); uiWindowOnClosing(w, onClosing, NULL);