Initial revision.

This commit is contained in:
curt
1998-06-12 01:04:52 +00:00
parent 2caad4a27b
commit cfe0e18e4e
18 changed files with 2427 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#include "puLocal.h"
void puFrame::draw ( int dx, int dy )
{
if ( !visible ) return ;
abox . draw ( dx, dy, style, colour, FALSE ) ;
/* If greyed out then halve the opacity when drawing the label and legend */
if ( active )
glColor4fv ( colour [ PUCOL_LEGEND ] ) ;
else
glColor4f ( colour [ PUCOL_LEGEND ][0],
colour [ PUCOL_LEGEND ][1],
colour [ PUCOL_LEGEND ][2],
colour [ PUCOL_LEGEND ][3] / 2.0 ) ; /* 50% more transparent */
int xx = ( abox.max[0] - abox.min[0] - puGetStringWidth ( legendFont, legend ) ) / 2 ;
puDrawString ( legendFont, legend,
dx + abox.min[0] + xx,
dy + abox.min[1] + puGetStringDescender ( legendFont ) + PUSTR_BGAP ) ;
draw_label ( dx, dy ) ;
}