]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add subtimer vertical padding
authorz411 <z411@omaera.org>
Fri, 4 Mar 2022 21:47:55 +0000 (18:47 -0300)
committerz411 <z411@omaera.org>
Fri, 4 Mar 2022 21:47:55 +0000 (18:47 -0300)
qcsrc/client/hud/panel/timer.qc

index 31468b15228da37dbd01c72f6980775d25dbaa76..93da240eadcdbf68d8d5f210f2c3f3489b3edaa4 100644 (file)
@@ -147,8 +147,9 @@ void HUD_Timer()
        HUD_Panel_DrawBg();
        
        if(subtimer) {
+               float subtimer_padding = subtimer_size.y / 5;
                timer_size.x -= subtimer_size.x;
-               drawstring_aspect(pos + eX * timer_size.x, (swap ? timer : subtimer), subtimer_size, (swap ? timer_color : subtimer_color), panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(pos + eX * timer_size.x + eY * subtimer_padding, (swap ? timer : subtimer), subtimer_size - eY * subtimer_padding * 2, (swap ? timer_color : subtimer_color), panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        
        drawstring_aspect(pos, (swap ? subtimer : timer), timer_size, (swap ? subtimer_color : timer_color), panel_fg_alpha, DRAWFLAG_NORMAL);