diff --git a/src/screen_work_flow.h b/src/screen_work_flow.h index 6895b53..7af7bbf 100644 --- a/src/screen_work_flow.h +++ b/src/screen_work_flow.h @@ -41,8 +41,10 @@ int print_menu(int highlight, char *choices[],int n_choices, char *message, char y = 2; box(menu_win, 0, 0); for(i = 0; i < n_choices; ++i) - { if(highlight == i + 1) /* High light the present choice */ - { wattron(menu_win, A_REVERSE); + { + if(highlight == i + 1) /* High light the present choice */ + { + wattron(menu_win, A_REVERSE); mvwprintw(menu_win, y, x, "%s", choices[i]); wattroff(menu_win, A_REVERSE); } @@ -58,7 +60,8 @@ int print_menu(int highlight, char *choices[],int n_choices, char *message, char c = wgetch(menu_win); // obtenemos las pulsaciones del teclado switch(c) - { case KEY_UP: //flecha arriba + { + case KEY_UP: //flecha arriba if(highlight == 1) // comprobamos que si highlight es 1 (primera posicion) lo dejamos igual (es decirlo, lo seleccionamos como high) highlight = n_choices; // lo dejamos a 1 (n_choices era 0) else @@ -127,7 +130,7 @@ void form_create(int n, char *opts[], char *opts_values[]) for(i=0; i