Changeset 8fa9562 for message.c


Ignore:
Timestamp:
Jan 20, 2007, 9:49:55 PM (14 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
575877f
Parents:
212764e
Message:
Added background color support to owl.

If we run out of color pairs during a painting of the screen, further
background colors will be silently dropped. I'm hoping this doesn't
happen often. The used pair list is reset with each draw, so only
what's actually on screen matters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    rf4d32cd r8fa9562  
    516516}
    517517
    518 void owl_message_curs_waddstr(owl_message *m, WINDOW *win, int aline, int bline, int acol, int bcol, int color)
     518void owl_message_curs_waddstr(owl_message *m, WINDOW *win, int aline, int bline, int acol, int bcol, int fgcolor, int bgcolor)
    519519{
    520520  owl_fmtext a, b;
     
    528528  owl_fmtext_truncate_lines(&(m->fmtext), aline, bline-aline+1, &a);
    529529  owl_fmtext_truncate_cols(&a, acol, bcol, &b);
    530   if (color!=OWL_COLOR_DEFAULT) {
    531     owl_fmtext_colorize(&b, color);
     530  if (fgcolor!=OWL_COLOR_DEFAULT) {
     531    owl_fmtext_colorize(&b, fgcolor);
     532  }
     533  if (bgcolor!=OWL_COLOR_DEFAULT) {
     534    owl_fmtext_colorizebg(&b, bgcolor);
    532535  }
    533536
Note: See TracChangeset for help on using the changeset viewer.