static long timeout = 2000;
static long trans_time = 250;
-static dtx_font *font;
+dtx_font *ui_font;
+int ui_font_size = FONTSZ;
void set_message_timeout(long tm)
{
void draw_ui()
{
- if(!font) return;
+ if(!ui_font) return;
while(msglist && msglist->show_until <= time_msec) {
Message *msg = msglist;
delete msg;
}
- dtx_use_font(font, FONTSZ);
+ dtx_use_font(ui_font, ui_font_size);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
done_init = true;
- if(!(font = dtx_open_font("data/ui.font", 0))) {
+ if(!(ui_font = dtx_open_font("data/ui.font", 0))) {
fprintf(stderr, "failed to open font: data/ui.font\n");
return false;
}
- dtx_prepare_range(font, FONTSZ, 32, 127);
+ dtx_prepare_range(ui_font, ui_font_size, 32, 127);
return true;
}