static void ui_pad_set_active( int n ) { int np; char * name; int i, j; for (i=0; i<17; i++ ) { Pad[i]->text = KeyPad[n]->buttontext[i]; Pad[i]->status = 1; Pad[i]->user_function = NULL; Pad[i]->dim_if_no_function = 1; Pad[i]->hotkey = -1; for (j=0; j< KeyPad[n]->numkeys; j++ ) { if (HotKey[i] == KeyPad[n]->keycode[j] ) { Pad[i]->hotkey = HotKey[i]; Pad[i]->user_function = func_nget( KeyPad[n]->function_number[j], &np, &name ); } if (HotKey1[i] == KeyPad[n]->keycode[j] ) { Pad[i]->hotkey1 = HotKey1[i]; Pad[i]->user_function1 = func_nget( KeyPad[n]->function_number[j], &np, &name ); } } } active_pad = n; }
static void ui_pad_set_active( int n ) { int np; char * name; int i, j; gr_set_current_canvas( NULL ); gr_setcolor( CWHITE ); gr_urect( desc_x, desc_y, desc_x+ 56*4-1, desc_y+15 ); gr_set_fontcolor( CBLACK, CWHITE ); gr_ustring( desc_x, desc_y, KeyPad[n]->description ); for (i=0; i<17; i++ ) { Pad[i]->text = KeyPad[n]->buttontext[i]; Pad[i]->status = 1; Pad[i]->user_function = NULL; Pad[i]->dim_if_no_function = 1; Pad[i]->hotkey = -1; for (j=0; j< KeyPad[n]->numkeys; j++ ) { if (HotKey[i] == KeyPad[n]->keycode[j] ) { Pad[i]->hotkey = HotKey[i]; Pad[i]->user_function = func_nget( KeyPad[n]->function_number[j], &np, &name ); } if (HotKey1[i] == KeyPad[n]->keycode[j] ) { Pad[i]->hotkey1 = HotKey1[i]; Pad[i]->user_function1 = func_nget( KeyPad[n]->function_number[j], &np, &name ); } } } active_pad = n; }