/* * Centre a formatted colour message at the bottom of the screen */ void info_message( const char *fmt, ...) { va_list ap; va_start(ap, fmt); clear_message(); #ifdef HAVE_COLOR fcol(tinrc.col_message); #endif /* HAVE_COLOR */ vsnprintf(mesg, sizeof(mesg), fmt, ap); center_line(cLINES, FALSE, mesg); /* center the message at screen bottom */ #ifdef HAVE_COLOR fcol(tinrc.col_normal); #endif /* HAVE_COLOR */ stow_cursor(); va_end(ap); }
void print_display(struct s_grid *grid, char *display, coord *select) { coord moove; int pc = 0; int i; init_cursor(select); system("clear"); display = write_game_data(grid, display, &pc); display = border_line(grid, display, &pc); for (i = 0; i < grid->width; ++i) { display = game_line(grid, display, &pc, i, select); if (i + 1 < grid->width) display = center_line(grid, display, &pc); } display = border_line(grid, display, &pc); write(1, display, pc); moove = coordonne(0, grid->width); init_cursor(&moove); place_cursor(select); }
void show_title( const char *title) { int col; col = (cCOLS - (int) strlen(_(txt_type_h_for_help))) + 1; if (col) { MoveCursor(0, col); #ifdef HAVE_COLOR fcol(tinrc.col_title); #endif /* HAVE_COLOR */ /* you have mail message in */ my_fputs((mail_check() ? _(txt_you_have_mail) : _(txt_type_h_for_help)), stdout); #ifdef HAVE_COLOR fcol(tinrc.col_normal); #endif /* HAVE_COLOR */ } center_line(0, TRUE, title); /* wastes some space on the left */ }