#108 add HUD text in case match is paused so that players know why they are 'stuck'

This commit is contained in:
drian
2021-04-14 10:18:44 +02:00
parent 4fd14cf6c2
commit f9526b53a4
+11
View File
@@ -967,6 +967,17 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
extern void renderhudtexturepreviews();
if(editmode) renderhudtexturepreviews();
if(ispaused)
{
glLoadIdentity();
const char* matchpaused = "MATCH PAUSED";
const double matchpausedfontfactor = 3 / 2.0f;
glOrtho(0, VIRTW * matchpausedfontfactor, VIRTH * matchpausedfontfactor, 0, -1, 1);
const int left = (VIRTW * matchpausedfontfactor) / 2 - text_width(matchpaused) / 2;
const int top = (VIRTH * matchpausedfontfactor) * 5 / 6;
draw_textf(matchpaused, left, top);
}
/* * /
glLoadIdentity();
glOrtho(0, VIRTW*3/2, VIRTH*3/2, 0, -1, 1);