Exemple #1
0
int
d_abitmap_text_proc (int msg, DIALOG *d, int c)
{
	if (msg == MSG_DRAW) {
		abitmap_draw_text (d, B_TEXT, 0, 0, 0, 0, 0);
		return D_O_K;
	}
	return d_text_proc (msg, d, c);
}
static int
quality_text_proc(int msg, DIALOG *d, int c)
{
	if (msg == MSG_DRAW) {
		rectfill(screen, d->x, d->y, d->x + d->w - 1, d->y + d->h - 1, gui_bg_color);
		sprintf(quality_string, "Quality: %d (%s)", d->d1,
			d->d1 < 20 ? "very low" :
			(d->d1 < 50 ? "low" :
			(d->d1 < 80 ? "medium" :
			(d->d1 < 95 ? "high" : "very high"))));
	}
	return d_text_proc(msg, d, c);
}