2019-01-16 20:18:28 +00:00
|
|
|
/***
|
|
|
|
*
|
|
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
|
|
*
|
|
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
|
|
*
|
|
|
|
****/
|
2016-12-18 09:09:01 +00:00
|
|
|
|
|
|
|
#include "VGUI.h"
|
|
|
|
|
2017-07-03 11:55:11 +00:00
|
|
|
/*
|
|
|
|
====================
|
|
|
|
VGUI_DrawSpectatorHUD
|
|
|
|
====================
|
|
|
|
*/
|
2016-12-18 09:09:01 +00:00
|
|
|
void VGUI_DrawSpectatorHUD( void ) {
|
2017-04-19 21:06:41 +00:00
|
|
|
vHUDColor = autocvar_con_color * ( 1 / 255 );
|
|
|
|
|
2016-12-18 09:09:01 +00:00
|
|
|
// Draw the borders
|
2017-11-16 22:53:02 +00:00
|
|
|
drawfill( vVideoMins, [ vVideoResolution_x, 40 ], '0 0 0', 1 );
|
|
|
|
drawfill( vVideoMins + [ 0, vVideoResolution_y - 40], [ vVideoResolution_x, 40 ], '0 0 0', 1 );
|
2016-12-18 09:09:01 +00:00
|
|
|
|
|
|
|
// Draw the timer
|
|
|
|
int iMinutes, iSeconds, iTens, iUnits;
|
2017-11-20 02:03:30 +00:00
|
|
|
iMinutes = getstatf( STAT_GAMETIME ) / 60;
|
|
|
|
iSeconds = getstatf( STAT_GAMETIME ) - 60 * iMinutes;
|
|
|
|
iTens = iSeconds / 10;
|
|
|
|
iUnits = iSeconds - 10 * iTens;
|
|
|
|
|
2016-12-18 09:09:01 +00:00
|
|
|
|
2017-11-16 22:53:02 +00:00
|
|
|
drawpic( vVideoMins + [ vVideoResolution_x - 70, 20 ], "gfx/vgui/640_timer", '14 14', '1 1 1', 1 );
|
2017-12-28 13:31:31 +00:00
|
|
|
VGUI_RightText( vVideoMins + [ vVideoResolution_x - 16, 23 ], sprintf( "%i:%i%i", iMinutes, iTens, iUnits ), '12 12', '0.56 0.56 0.21', FONT_CON );
|
2016-12-18 09:09:01 +00:00
|
|
|
|
|
|
|
// Draw the money
|
2017-12-28 13:31:31 +00:00
|
|
|
CSQC_DrawText( vVideoMins + [ vVideoResolution_x - 67, 6 ], "$", '12 12', '0.56 0.56 0.21', 1, 0, FONT_CON );
|
|
|
|
VGUI_RightText( vVideoMins + [ vVideoResolution_x - 16, 6 ], sprintf( "%d", getstatf( STAT_MONEY ) ), '12 12', '0.56 0.56 0.21', FONT_CON );
|
2016-12-18 09:09:01 +00:00
|
|
|
|
|
|
|
// Seperator
|
2017-11-16 22:53:02 +00:00
|
|
|
drawfill( vVideoMins + [ vVideoResolution_x - 85, 6 ], [ 2, 28 ], '0.56 0.56 0.21', 1 );
|
2016-12-18 09:09:01 +00:00
|
|
|
|
|
|
|
// Team Stats
|
2017-12-28 13:31:31 +00:00
|
|
|
VGUI_RightText( vVideoMins + [ vVideoResolution_x - 96, 6 ], sprintf( _("VGUI_SPEC_TCOUNTER"), getstatf( STAT_WON_T ) ), '12 12', '0.56 0.56 0.21', FONT_CON );
|
|
|
|
VGUI_RightText( vVideoMins + [ vVideoResolution_x - 96, 23 ], sprintf( _("VGUI_SPEC_CTCOUNTER"), getstatf( STAT_WON_CT ) ), '12 12', '0.56 0.56 0.21', FONT_CON );
|
2016-12-18 09:09:01 +00:00
|
|
|
}
|