]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
split up DrawQ_String_Font_UntilX in DrawQ_TextWidth_Font_TrackColors and DrawQ_Strin...
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index ec29774e764df398e8547c6b08d6a6358b5df8b5..deee45df35d176b07addfee96ad32db8e95007b0 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -1080,7 +1080,7 @@ void Sbar_ShowFPS(void)
                fps_y = vid_conheight.integer - fps_height;
                if (fpsstring[0])
                {
-                       fps_x = vid_conwidth.integer - DrawQ_TextWidth_Font(fpsstring, 0, fps_scalex, fps_scaley, true, FONT_INFOBAR);
+                       fps_x = vid_conwidth.integer - DrawQ_TextWidth_Font(fpsstring, 0, true, FONT_INFOBAR) * fps_scalex;
                        DrawQ_Fill(fps_x, fps_y, vid_conwidth.integer - fps_x, fps_scaley, 0, 0, 0, 0.5, 0);
                        if (red)
                                DrawQ_String_Font(fps_x, fps_y, fpsstring, 0, fps_scalex, fps_scaley, 1, 0, 0, 1, 0, NULL, true, FONT_INFOBAR);
@@ -1090,14 +1090,14 @@ void Sbar_ShowFPS(void)
                }
                if (timestring[0])
                {
-                       fps_x = vid_conwidth.integer - DrawQ_TextWidth_Font(timestring, 0, fps_scalex, fps_scaley, true, FONT_INFOBAR);
+                       fps_x = vid_conwidth.integer - DrawQ_TextWidth_Font(timestring, 0, true, FONT_INFOBAR) * fps_scalex;
                        DrawQ_Fill(fps_x, fps_y, vid_conwidth.integer - fps_x, fps_scaley, 0, 0, 0, 0.5, 0);
                        DrawQ_String_Font(fps_x, fps_y, timestring, 0, fps_scalex, fps_scaley, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
                        fps_y += fps_scaley;
                }
                if (datestring[0])
                {
-                       fps_x = vid_conwidth.integer - DrawQ_TextWidth_Font(datestring, 0, fps_scalex, fps_scaley, true, FONT_INFOBAR);
+                       fps_x = vid_conwidth.integer - DrawQ_TextWidth_Font(datestring, 0, true, FONT_INFOBAR) * fps_scalex;
                        DrawQ_Fill(fps_x, fps_y, vid_conwidth.integer - fps_x, fps_scaley, 0, 0, 0, 0.5, 0);
                        DrawQ_String_Font(fps_x, fps_y, datestring, 0, fps_scalex, fps_scaley, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
                        fps_y += fps_scaley;