[Plib-cvs] plib/src/pui puListBox.cxx,1.24,1.25
Brought to you by:
sjbaker
From: John F. F. <fa...@us...> - 2005-07-14 16:43:06
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15188 Modified Files: puListBox.cxx Log Message: Making the color changeable by the application Index: puListBox.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puListBox.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- puListBox.cxx 6 May 2005 18:31:25 -0000 1.24 +++ puListBox.cxx 14 Jul 2005 16:42:57 -0000 1.25 @@ -114,9 +114,15 @@ for ( int i = top ; i < num && i < top + num_vis ; i++ ) { if ( i == selected ) - glColor4f ( 1.0f, 1.0f, 1.0f, 1.0f ) ; + glColor4f ( (colour [ PUCOL_BACKGROUND ][0] + colour [ PUCOL_LABEL ][0]) / 2.0f, + (colour [ PUCOL_BACKGROUND ][1] + colour [ PUCOL_LABEL ][1]) / 2.0f, + (colour [ PUCOL_BACKGROUND ][2] + colour [ PUCOL_LABEL ][2]) / 2.0f, + (colour [ PUCOL_BACKGROUND ][3] + colour [ PUCOL_LABEL ][3]) / 2.0f ); else - glColor4f ( 0.0f, 0.0f, 0.0f, 1.0f ) ; + glColor4f ( colour [ PUCOL_LABEL ][0], + colour [ PUCOL_LABEL ][1], + colour [ PUCOL_LABEL ][2], + colour [ PUCOL_LABEL ][3] ) ; int x = PUSTR_LGAP ; int y = yinc * ((i-top)+1) ; |