mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
cg_draw change for scoreboard
This commit is contained in:
parent
126ed66f84
commit
bb05f13824
2 changed files with 36 additions and 2 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.9 2002/03/24 22:48:57 niceass
|
||||
// cg_draw change for scoreboard
|
||||
//
|
||||
// Revision 1.8 2002/02/04 00:22:50 niceass
|
||||
// Added DrawCleanBox for scoreboard
|
||||
//
|
||||
|
@ -79,6 +82,32 @@ void CG_DrawTopBottom(float x, float y, float w, float h, float size) {
|
|||
trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CG_DrawCleanTopBottom -- Added by NiceAss
|
||||
"Size" not scaled
|
||||
|
||||
Coordinates are 640*480 virtual values
|
||||
=================
|
||||
*/
|
||||
void CG_DrawCleanSides(float x, float y, float w, float h, float size, const float *color) {
|
||||
CG_AdjustFrom640( &x, &y, &w, &h );
|
||||
trap_R_SetColor( color );
|
||||
trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );
|
||||
trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
||||
void CG_DrawCleanLine(float x, float y, float w, float size, const float *color) {
|
||||
float h=0;
|
||||
|
||||
CG_AdjustFrom640( &x, &y, &w, &h );
|
||||
trap_R_SetColor( color );
|
||||
trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader );
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
UI_DrawRect
|
||||
|
@ -89,8 +118,8 @@ Coordinates are 640*480 virtual values
|
|||
void CG_DrawRect( float x, float y, float width, float height, float size, const float *color ) {
|
||||
trap_R_SetColor( color );
|
||||
|
||||
CG_DrawTopBottom(x, y, width, height, size);
|
||||
CG_DrawSides(x, y, width, height, size);
|
||||
CG_DrawTopBottom(x, y, width, height, size);
|
||||
CG_DrawSides(x, y, width, height, size);
|
||||
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.59 2002/03/24 22:48:29 niceass
|
||||
// cg_draw change for scoreboard
|
||||
//
|
||||
// Revision 1.58 2002/03/23 05:50:47 jbravo
|
||||
// Moved enableDust out of the missionpack
|
||||
//
|
||||
|
@ -1641,7 +1644,9 @@ void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t
|
|||
void CG_DrawRect( float x, float y, float width, float height, float size, const float *color );
|
||||
void CG_DrawSides(float x, float y, float w, float h, float size);
|
||||
void CG_DrawTopBottom(float x, float y, float w, float h, float size);
|
||||
void CG_DrawCleanSides(float x, float y, float w, float h, float size, const float *color);
|
||||
void CG_DrawCleanRect( float x, float y, float width, float height, float size, const float *color );
|
||||
void CG_DrawCleanLine(float x, float y, float w, float size, const float *color);
|
||||
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue