int newmenu_do3( char * title, char * subtitle, int nitems, newmenu_item * item, void (*subfunction)(int nitems,newmenu_item * items, int * last_key, int citem), int citem, char * filename, int width, int height )
{
int old_keyd_repeat, done;
int choice,old_choice,i,j,x,y,w,h,aw, tw, th, twidth,fm,right_offset;
int k, nmenus, nothers;
grs_canvas * save_canvas;
grs_font * save_font;
int string_width, string_height, average_width;
int ty;
bkg bg;
int all_text=0; //set true if all text items
int time_stopped=0;
if (nitems < 1 )
return -1;
set_screen_mode(SCREEN_MENU);
//NO_SOUND_PAUSE if ( Function_mode == FMODE_GAME ) {
// int lb_callback( int * citem, int *nitems, char * items[], int *keypress )
// {
// int i;
//
// if ( *keypress = KEY_CTRLED+KEY_D ) {
// if ( *nitems > 1 ) {
// unlink( items[*citem] ); // Delete the file
// for (i=*citem; i<*nitems-1; i++ ) {
// items[i] = items[i+1];
// }
// *nitems = *nitems - 1;
// free( items[*nitems] );
// items[*nitems] = NULL;
// return 1; // redraw;
// }
// *keypress = 0;
// }
// return 0;
// }
#define LB_ITEMS_ON_SCREEN 8
int newmenu_listbox( char * title, int nitems, char * items[], int allow_abort_flag, int (*listbox_callback)( int * citem, int *nitems, char * items[], int *keypress ) )
int newmenu_listbox1( char * title, int nitems, char * items[], int allow_abort_flag, int default_item, int (*listbox_callback)( int * citem, int *nitems, char * items[], int *keypress ) )
{
int i;
int done, ocitem,citem, ofirst_item, first_item, key, redraw;