|
| Below is a piece of code for a menu. The use_console function is a
function that writes to a separate window trough a variable argument
list with vwprintw(). Everything works ok, but..
The first 2 messages (the 2 lines in the top piece of the code) are
dumped nicely on the console window. This because i refresh_all which
contains wrefreshes to all windows. However, when i select a menu
option, and use use_console() i do not get it on the console. It doesn't
matter where i refresh, it doesn't show.
I really don't know what the problem is. I can show the use_console()
code on request, but i don't think there is any problem there. In case
i select menu item 0, new_competition() is called fine, so there is no
problem there. It just doesn't write it to the console window. Or it
does, but doesn't refresh!
Any help most appreciated!
Kind regards,
atv
/* Status */
use_console("%s gestart in %s modus, klaar voor
gebruik!",argv[0],mode);
use_console("bla");
refresh_all();
while((c=wgetch(left))!=KEY_F(1)) {
switch(c) {
case KEY_DOWN:
menu_driver(menu,REQ_DOWN_ITEM);
break;
case KEY_UP:
menu_driver(menu,REQ_UP_ITEM);
break;
case 10: /* Enter */
switch(item_index(current_item(menu))) {
case 0: new_competition();
break;
case 1: use_console("keuze 1! %s",argv[0]);
break;
case 6: use_console("Statistieken wordt
afgesloten");
endwin();
exit(1);
break;
}
break;
}
}
sleep(1000);
endwin();
return 0;
}
|
|