1 /* $Id: ui.c,v 1.3 2004-12-19 15:21:11 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
16 static char rcsid[] = "$Id: ui.c,v 1.3 2004-12-19 15:21:11 btb Exp $";
39 extern void InstallErrorHandler();
41 static int Initialized = 0;
43 unsigned char CBLACK,CGREY,CWHITE,CBRIGHT,CRED;
45 grs_font * ui_small_font = NULL;
51 if (Initialized) return;
55 org_font = grd_curcanv->cv_font;
56 ui_small_font = gr_init_font( "pc6x8.fnt" );
57 grd_curcanv->cv_font =org_font;
59 CBLACK = gr_find_closest_color( 1, 1, 1 );
60 CGREY = gr_find_closest_color( 45, 45, 45 );
61 CWHITE = gr_find_closest_color( 50, 50, 50 );
62 CBRIGHT = gr_find_closest_color( 58, 58, 58 );
63 CRED = gr_find_closest_color( 63, 0, 0 );
69 gr_set_fontcolor( CBLACK, CWHITE );
73 InstallErrorHandler();
96 gr_close_font( ui_small_font );