Skip to content

Commit 0ccf5b8

Browse files
committed
Merge additional HUD changes from HL25 Update.
1 parent b8d8a51 commit 0ccf5b8

File tree

6 files changed

+69
-49
lines changed

6 files changed

+69
-49
lines changed

cl_dll/cl_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ inline struct cvar_s *CVAR_CREATE( const char *cv, const char *val, const int fl
7171
// Use this to set any co-ords in 640x480 space
7272
#define XRES(x) ( (int)( float(x) * ( (float)ScreenWidth / 640.0f ) + 0.5f ) )
7373
#define YRES(y) ( (int)( float(y) * ( (float)ScreenHeight / 480.0f ) + 0.5f ) )
74+
#define XRES_HD(x) ( (int)( float(x) * Q_max(1.f, (float)ScreenWidth / 1280.f )))
75+
#define YRES_HD(y) ( (int)( float(y) * Q_max(1.f, (float)ScreenHeight / 720.f )))
7476

7577
// use this to project world coordinates to screen coordinates
7678
#define XPROJECT(x) ( ( 1.0f + (x) ) * ScreenWidth * 0.5f )

cl_dll/death.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ int CHudDeathNotice::Draw( float flTime )
9696
{
9797
int x, y, r, g, b;
9898

99+
int gap = 20;
100+
101+
const wrect_t& sprite = gHUD.GetSpriteRect(m_HUD_d_skull);
102+
gap = sprite.bottom - sprite.top;
103+
104+
SCREENINFO screenInfo;
105+
106+
screenInfo.iSize = sizeof(SCREENINFO);
107+
gEngfuncs.pfnGetScreenInfo(&screenInfo);
108+
gap = Q_max( gap, screenInfo.iCharHeight );
109+
99110
for( int i = 0; i < MAX_DEATHNOTICES; i++ )
100111
{
101112
if( rgDeathNoticeList[i].iId == 0 )
@@ -119,10 +130,10 @@ int CHudDeathNotice::Draw( float flTime )
119130
#endif
120131
{
121132
// Draw the death notice
122-
y = YRES( DEATHNOTICE_TOP ) + 2 + ( 20 * i ); //!!!
133+
y = YRES( DEATHNOTICE_TOP ) + 2 + ( gap * i ); //!!!
123134

124135
int id = ( rgDeathNoticeList[i].iId == -1 ) ? m_HUD_d_skull : rgDeathNoticeList[i].iId;
125-
x = ScreenWidth - ConsoleStringLen( rgDeathNoticeList[i].szVictim ) - ( gHUD.GetSpriteRect(id).right - gHUD.GetSpriteRect(id).left );
136+
x = ScreenWidth - ConsoleStringLen( rgDeathNoticeList[i].szVictim ) - ( gHUD.GetSpriteRect(id).right - gHUD.GetSpriteRect(id).left ) - 4;
126137

127138
if( !rgDeathNoticeList[i].iSuicide )
128139
{
@@ -131,7 +142,7 @@ int CHudDeathNotice::Draw( float flTime )
131142
// Draw killers name
132143
if( rgDeathNoticeList[i].KillerColor )
133144
DrawSetTextColor( rgDeathNoticeList[i].KillerColor[0], rgDeathNoticeList[i].KillerColor[1], rgDeathNoticeList[i].KillerColor[2] );
134-
x = 5 + DrawConsoleString( x, y, rgDeathNoticeList[i].szKiller );
145+
x = 5 + DrawConsoleString( x, y + 4, rgDeathNoticeList[i].szKiller );
135146
}
136147

137148
r = 255; g = 80; b = 0;
@@ -151,7 +162,7 @@ int CHudDeathNotice::Draw( float flTime )
151162
{
152163
if( rgDeathNoticeList[i].VictimColor )
153164
DrawSetTextColor( rgDeathNoticeList[i].VictimColor[0], rgDeathNoticeList[i].VictimColor[1], rgDeathNoticeList[i].VictimColor[2] );
154-
x = DrawConsoleString( x, y, rgDeathNoticeList[i].szVictim );
165+
x = DrawConsoleString( x, y + 4, rgDeathNoticeList[i].szVictim );
155166
}
156167
}
157168
}

cl_dll/hud_spectator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,10 @@ int CHudSpectator::Draw( float flTime )
657657
// check if name would be in inset window
658658
if( m_pip->value != INSET_OFF )
659659
{
660-
if( m_vPlayerPos[i][0] > XRES( m_OverviewData.insetWindowX ) &&
661-
m_vPlayerPos[i][1] > YRES( m_OverviewData.insetWindowY ) &&
662-
m_vPlayerPos[i][0] < XRES( m_OverviewData.insetWindowX + m_OverviewData.insetWindowWidth ) &&
663-
m_vPlayerPos[i][1] < YRES( m_OverviewData.insetWindowY + m_OverviewData.insetWindowHeight) )
660+
if( m_vPlayerPos[i][0] > XRES_HD( m_OverviewData.insetWindowX ) &&
661+
m_vPlayerPos[i][1] > YRES_HD( m_OverviewData.insetWindowY ) &&
662+
m_vPlayerPos[i][0] < XRES_HD( m_OverviewData.insetWindowX + m_OverviewData.insetWindowWidth ) &&
663+
m_vPlayerPos[i][1] < YRES_HD( m_OverviewData.insetWindowY + m_OverviewData.insetWindowHeight) )
664664
continue;
665665
}
666666

cl_dll/menu.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ int CHudMenu::Draw( float flTime )
8787
return 1;
8888
#endif
8989

90+
SCREENINFO screenInfo;
91+
92+
screenInfo.iSize = sizeof( SCREENINFO );
93+
gEngfuncs.pfnGetScreenInfo( &screenInfo );
94+
9095
// draw the menu, along the left-hand side of the screen
9196
// count the number of newlines
9297
int nlc = 0;
@@ -96,15 +101,17 @@ int CHudMenu::Draw( float flTime )
96101
nlc++;
97102
}
98103

104+
int nFontHeight = Q_max(12, screenInfo.iCharHeight);
105+
99106
// center it
100-
int y = ( ScreenHeight / 2 ) - ( ( nlc / 2 ) * 12 ) - 40; // make sure it is above the say text
107+
int y = ( ScreenHeight / 2 ) - ( ( nlc / 2 ) * nFontHeight ) - (3 * nFontHeight + nFontHeight / 3); // make sure it is above the say text
101108
int x = 20;
102109

103110
i = 0;
104111
while( i < MAX_MENU_STRING && g_szMenuString[i] != '\0' )
105112
{
106113
gHUD.DrawHudString( x, y, 320, g_szMenuString + i, 255, 255, 255 );
107-
y += 12;
114+
y += nFontHeight;
108115

109116
while( i < MAX_MENU_STRING && g_szMenuString[i] != '\0' && g_szMenuString[i] != '\n' )
110117
i++;

cl_dll/vgui_SpectatorPanel.cpp

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ extern "C" void DLLEXPORT HUD_ChatInputPosition( int *x, int *y )
3737
{
3838
if ( gHUD.m_Spectator.m_pip->value == INSET_OFF )
3939
{
40-
*y = YRES( PANEL_HEIGHT );
40+
*y = YRES_HD( PANEL_HEIGHT );
4141
}
4242
else
4343
{
44-
*y = YRES( gHUD.m_Spectator.m_OverviewData.insetWindowHeight + 5 );
44+
*y = YRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowHeight + 5 );
4545
}
4646
}
4747
}
@@ -101,15 +101,15 @@ void SpectatorPanel::Initialize()
101101

102102
SchemeHandle_t hSmallScheme = pSchemes->getSchemeHandle( "Team Info Text" );
103103

104-
m_TopBorder = new CTransparentPanel( 64, 0, 0, ScreenWidth, YRES( PANEL_HEIGHT ) );
104+
m_TopBorder = new CTransparentPanel( 64, 0, 0, ScreenWidth, YRES_HD( PANEL_HEIGHT ) );
105105
m_TopBorder->setParent( this );
106106

107-
m_BottomBorder = new CTransparentPanel( 64, 0, ScreenHeight - YRES( 32 ), ScreenWidth, YRES( PANEL_HEIGHT ) );
107+
m_BottomBorder = new CTransparentPanel( 64, 0, ScreenHeight - YRES_HD( PANEL_HEIGHT ), ScreenWidth, YRES_HD( PANEL_HEIGHT ) );
108108
m_BottomBorder->setParent( this );
109109

110110
setPaintBackgroundEnabled( false );
111111

112-
m_ExtraInfo = new Label( "Extra Info", 0, 0, wide, YRES( PANEL_HEIGHT ) );
112+
m_ExtraInfo = new Label( "Extra Info", 0, 0, wide, YRES_HD( PANEL_HEIGHT ) );
113113
m_ExtraInfo->setParent( m_TopBorder );
114114
m_ExtraInfo->setFont( pSchemes->getFont( hSmallScheme ) );
115115

@@ -120,24 +120,24 @@ void SpectatorPanel::Initialize()
120120
m_TimerImage = new CImageLabel( "timer", 0, 0, 14, 14 );
121121
m_TimerImage->setParent( m_TopBorder );
122122

123-
m_TopBanner = new CImageLabel( "banner", 0, 0, XRES( BANNER_WIDTH ), YRES( BANNER_HEIGHT ) );
123+
m_TopBanner = new CImageLabel( "banner", 0, 0, XRES_HD( BANNER_WIDTH ), YRES_HD( BANNER_HEIGHT ) );
124124
m_TopBanner->setParent( this );
125125

126-
m_CurrentTime = new Label( "00:00", 0, 0, wide, YRES( PANEL_HEIGHT ) );
126+
m_CurrentTime = new Label( "00:00", 0, 0, wide, YRES_HD( PANEL_HEIGHT ) );
127127
m_CurrentTime->setParent( m_TopBorder );
128128
m_CurrentTime->setFont( pSchemes->getFont( hSmallScheme ) );
129129
m_CurrentTime->setPaintBackgroundEnabled( false );
130130
m_CurrentTime->setFgColor( 143, 143, 54, 0 );
131131
m_CurrentTime->setContentAlignment( vgui::Label::a_west );
132132

133-
m_Separator = new Panel( 0, 0, XRES( 64 ), YRES( 96 ) );
133+
m_Separator = new Panel( 0, 0, XRES_HD( 64 ), YRES_HD( 96 ) );
134134
m_Separator->setParent( m_TopBorder );
135135
m_Separator->setFgColor( 59, 58, 34, 48 );
136136
m_Separator->setBgColor( 59, 58, 34, 48 );
137137

138138
for( int j = 0; j < TEAM_NUMBER; j++ )
139139
{
140-
m_TeamScores[j] = new Label( " ", 0, 0, wide, YRES( PANEL_HEIGHT ) );
140+
m_TeamScores[j] = new Label( " ", 0, 0, wide, YRES_HD( PANEL_HEIGHT ) );
141141
m_TeamScores[j]->setParent( m_TopBorder );
142142
m_TeamScores[j]->setFont( pSchemes->getFont( hSmallScheme ) );
143143
m_TeamScores[j]->setPaintBackgroundEnabled( false );
@@ -147,8 +147,8 @@ void SpectatorPanel::Initialize()
147147
}
148148

149149
// Initialize command buttons.
150-
// m_OptionButton = new ColorButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES(15), YRES(6), XRES(OPTIONS_BUTTON_X), YRES(20), false, false );
151-
m_OptionButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES(15), YRES(6), XRES(OPTIONS_BUTTON_X), YRES(20), false, false );
150+
// m_OptionButton = new ColorButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES_HD(15), YRES_HD(6), XRES_HD(OPTIONS_BUTTON_X), YRES_HD(20), false, false );
151+
m_OptionButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES_HD(15), YRES_HD(6), XRES_HD(OPTIONS_BUTTON_X), YRES_HD(20), false, false );
152152
m_OptionButton->setParent( m_BottomBorder );
153153
m_OptionButton->setContentAlignment( vgui::Label::a_center );
154154
m_OptionButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
@@ -158,7 +158,7 @@ void SpectatorPanel::Initialize()
158158
m_OptionButton->setUnArmedColor( 143, 143, 54, 0 );
159159
m_OptionButton->setArmedColor( 194, 202, 54, 0 );
160160

161-
m_CamButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#CAM_OPTIONS" ), ScreenWidth - ( XRES ( CAMOPTIONS_BUTTON_X ) + 15 ), YRES(6), XRES ( CAMOPTIONS_BUTTON_X ), YRES(20), false, false );
161+
m_CamButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#CAM_OPTIONS" ), ScreenWidth - ( XRES_HD( CAMOPTIONS_BUTTON_X ) + 15 ), YRES_HD(6), XRES_HD ( CAMOPTIONS_BUTTON_X ), YRES_HD(20), false, false );
162162
m_CamButton->setParent( m_BottomBorder );
163163
m_CamButton->setContentAlignment( vgui::Label::a_center );
164164
m_CamButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
@@ -168,8 +168,8 @@ void SpectatorPanel::Initialize()
168168
m_CamButton->setUnArmedColor( 143, 143, 54, 0 );
169169
m_CamButton->setArmedColor( 194, 202, 54, 0 );
170170

171-
// m_PrevPlayerButton= new ColorButton("<", XRES( 15 + OPTIONS_BUTTON_X + 15 ), YRES(6), XRES(24), YRES(20), false, false );
172-
m_PrevPlayerButton= new CImageButton("arrowleft", XRES( 15 + OPTIONS_BUTTON_X + 15 ), YRES(6), XRES(24), YRES(20), false, false );
171+
// m_PrevPlayerButton= new ColorButton("<", XRES_HD( 15 + OPTIONS_BUTTON_X + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20), false, false );
172+
m_PrevPlayerButton= new CImageButton("arrowleft", XRES_HD( 15 + OPTIONS_BUTTON_X + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20), false, false );
173173
m_PrevPlayerButton->setParent( m_BottomBorder );
174174
m_PrevPlayerButton->setContentAlignment( vgui::Label::a_center );
175175
m_PrevPlayerButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
@@ -179,8 +179,8 @@ void SpectatorPanel::Initialize()
179179
m_PrevPlayerButton->setUnArmedColor( 143, 143, 54, 0 );
180180
m_PrevPlayerButton->setArmedColor( 194, 202, 54, 0 );
181181

182-
// m_NextPlayerButton= new ColorButton(">", (ScreenWidth - (XRES ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES ( 24 + 15 ), YRES(6), XRES(24), YRES(20),false, false );
183-
m_NextPlayerButton= new CImageButton("arrowright", (ScreenWidth - (XRES ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES ( 24 + 15 ), YRES(6), XRES(24), YRES(20),false, false );
182+
// m_NextPlayerButton= new ColorButton(">", (ScreenWidth - (XRES_HD ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES_HD ( 24 + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20),false, false );
183+
m_NextPlayerButton= new CImageButton("arrowright", (ScreenWidth - (XRES_HD ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES_HD ( 24 + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20),false, false );
184184
m_NextPlayerButton->setParent( m_BottomBorder );
185185
m_NextPlayerButton->setContentAlignment( vgui::Label::a_center );
186186
m_NextPlayerButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
@@ -191,10 +191,10 @@ void SpectatorPanel::Initialize()
191191
m_NextPlayerButton->setArmedColor( 194, 202, 54, 0 );
192192

193193
// Initialize the bottom title.
194-
float flLabelSize = ( ( ScreenWidth - ( XRES ( CAMOPTIONS_BUTTON_X ) + 15 ) ) - XRES( 24 + 15 ) ) - XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 38 );
194+
float flLabelSize = ( ( ScreenWidth - ( XRES_HD ( CAMOPTIONS_BUTTON_X ) + 15 ) ) - XRES_HD( 24 + 15 ) ) - XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 38 );
195195

196196
m_BottomMainButton = new DropDownButton("Spectator Bottom",
197-
XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES(6), flLabelSize, YRES(20),
197+
XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES_HD(6), flLabelSize, YRES_HD(20),
198198
false, false );
199199

200200
m_BottomMainButton->setParent(m_BottomBorder);
@@ -211,7 +211,7 @@ void SpectatorPanel::Initialize()
211211

212212

213213
m_BottomMainLabel = new Label("Spectator Bottom",
214-
XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES(6), flLabelSize, YRES(20));
214+
XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES_HD(6), flLabelSize, YRES_HD(20));
215215

216216
m_BottomMainLabel->setParent( m_BottomBorder );
217217
m_BottomMainLabel->setPaintBackgroundEnabled( false );
@@ -220,7 +220,7 @@ void SpectatorPanel::Initialize()
220220
m_BottomMainLabel->setBorder( NULL );
221221
m_BottomMainLabel->setVisible(false);
222222

223-
m_InsetViewButton = new ColorButton( "", XRES( 2 ), YRES( 2 ), XRES( 240 ), YRES( 180 ), false, false );
223+
m_InsetViewButton = new ColorButton( "", XRES_HD( 2 ), YRES_HD( 2 ), XRES_HD( 240 ), YRES_HD( 180 ), false, false );
224224
m_InsetViewButton->setParent( this );
225225
m_InsetViewButton->setBoundKey( (char)255 );
226226
m_InsetViewButton->addActionSignal( new CSpectatorHandler_Command( this, SPECTATOR_PANEL_CMD_TOGGLE_INSET ) );
@@ -257,11 +257,11 @@ void SpectatorPanel::ShowMenu( bool isVisible )
257257
m_BottomMainButton->setVisible(false);
258258

259259
m_BottomMainLabel->getSize( iLabelSizeX, iLabelSizeY );
260-
m_BottomMainLabel->setPos( ( ScreenWidth / 2 ) - ( iLabelSizeX / 2 ), YRES( 6 ) );
260+
m_BottomMainLabel->setPos( ( ScreenWidth / 2 ) - ( iLabelSizeX / 2 ), YRES_HD( 6 ) );
261261
}
262262
else
263263
{
264-
m_BottomMainButton->setPos( XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES(6) );
264+
m_BottomMainButton->setPos( XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES_HD(6) );
265265
m_BottomMainLabel->setVisible(false);
266266
m_BottomMainButton->setVisible(true);
267267
}
@@ -328,18 +328,18 @@ void SpectatorPanel::EnableInsetView(bool isEnabled)
328328
if( isEnabled )
329329
{
330330
// short black bar to see full inset
331-
m_TopBorder->setBounds( XRES( offset ), 0, XRES(640 - offset ), YRES( PANEL_HEIGHT ) );
331+
m_TopBorder->setBounds( XRES_HD( offset ), 0, XRES_HD(640 - offset ), YRES_HD( PANEL_HEIGHT ) );
332332

333333
if( gEngfuncs.IsSpectateOnly() )
334334
{
335335
m_TopBanner->setVisible( true );
336-
m_TopBanner->setPos( XRES( offset ), 0 );
336+
m_TopBanner->setPos( XRES_HD( offset ), 0 );
337337
}
338338
else
339339
m_TopBanner->setVisible( false );
340340

341-
m_InsetViewButton->setBounds( XRES( x -1 ), YRES( y ),
342-
XRES( wide +2), YRES( tall ) );
341+
m_InsetViewButton->setBounds( XRES_HD( x -1 ), YRES_HD( y ),
342+
XRES_HD( wide +2), YRES_HD( tall ) );
343343
m_InsetViewButton->setVisible( true );
344344
}
345345
else
@@ -354,7 +354,7 @@ void SpectatorPanel::EnableInsetView(bool isEnabled)
354354
else
355355
m_TopBanner->setVisible( false );
356356

357-
m_TopBorder->setBounds( 0, 0, ScreenWidth, YRES( PANEL_HEIGHT ) );
357+
m_TopBorder->setBounds( 0, 0, ScreenWidth, YRES_HD( PANEL_HEIGHT ) );
358358

359359
m_InsetViewButton->setVisible( false );
360360
}
@@ -393,28 +393,28 @@ void SpectatorPanel::Update()
393393
m_ExtraInfo->getTextSize( iTextWidth, iTextHeight );
394394
m_CurrentTime->getTextSize( iTimeWidth, iTimeHeight );
395395

396-
iTimeWidth += XRES ( SEPERATOR_WIDTH*2 + 1 ); // +timer icon
396+
iTimeWidth += XRES_HD ( SEPERATOR_WIDTH*2 + 1 ); // +timer icon
397397
iTimeWidth += ( SEPERATOR_WIDTH-(iTimeWidth%SEPERATOR_WIDTH) );
398398

399399
if( iTimeWidth > iTextWidth )
400400
iTextWidth = iTimeWidth;
401401

402-
int xPos = ScreenWidth - ( iTextWidth + XRES ( SEPERATOR_WIDTH + offset ) );
402+
int xPos = ScreenWidth - ( iTextWidth + XRES_HD ( SEPERATOR_WIDTH + offset ) );
403403

404-
m_ExtraInfo->setBounds( xPos, YRES( SEPERATOR_HEIGHT ), iTextWidth, iTextHeight );
404+
m_ExtraInfo->setBounds( xPos, YRES_HD( SEPERATOR_HEIGHT ), iTextWidth, iTextHeight );
405405

406-
m_TimerImage->setBounds( xPos, YRES( SEPERATOR_HEIGHT ) + iTextHeight , XRES(SEPERATOR_WIDTH*2 + 1), YRES(SEPERATOR_HEIGHT + 1) );
406+
m_TimerImage->setBounds( xPos, YRES_HD( SEPERATOR_HEIGHT ) + iTextHeight , XRES_HD(SEPERATOR_WIDTH*2 + 1), YRES_HD(SEPERATOR_HEIGHT + 1) );
407407

408-
m_CurrentTime->setBounds( xPos + XRES ( SEPERATOR_WIDTH*2 + 1 ), YRES( SEPERATOR_HEIGHT ) + iTextHeight , iTimeWidth, iTimeHeight );
408+
m_CurrentTime->setBounds( xPos + XRES_HD ( SEPERATOR_WIDTH*2 + 1 ), YRES_HD( SEPERATOR_HEIGHT ) + iTextHeight , iTimeWidth, iTimeHeight );
409409

410-
m_Separator->setPos( ScreenWidth - ( iTextWidth + XRES ( 2*SEPERATOR_WIDTH+SEPERATOR_WIDTH/2+offset ) ) , YRES( 5 ) );
411-
m_Separator->setSize( XRES( 1 ), PANEL_HEIGHT - 10 );
410+
m_Separator->setPos( ScreenWidth - ( iTextWidth + XRES_HD ( 2*SEPERATOR_WIDTH+SEPERATOR_WIDTH/2+offset ) ) , YRES_HD( 5 ) );
411+
m_Separator->setSize( XRES_HD( 1 ), PANEL_HEIGHT - 10 );
412412

413413
for( j = 0; j < TEAM_NUMBER; j++ )
414414
{
415415
int iwidth, iheight;
416416

417417
m_TeamScores[j]->getTextSize( iwidth, iheight );
418-
m_TeamScores[j]->setBounds( ScreenWidth - ( iTextWidth + XRES ( 2*SEPERATOR_WIDTH+2*SEPERATOR_WIDTH/2+offset ) + iwidth ), YRES( SEPERATOR_HEIGHT ) + ( iheight * j ), iwidth, iheight );
418+
m_TeamScores[j]->setBounds( ScreenWidth - ( iTextWidth + XRES_HD ( 2*SEPERATOR_WIDTH+2*SEPERATOR_WIDTH/2+offset ) + iwidth ), YRES_HD( SEPERATOR_HEIGHT ) + ( iheight * j ), iwidth, iheight );
419419
}
420420
}

cl_dll/view.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,10 +1496,10 @@ void V_CalcSpectatorRefdef( struct ref_params_s * pparams )
14961496
{
14971497
// second renderer cycle, inset window
14981498
// set inset parameters
1499-
pparams->viewport[0] = XRES( gHUD.m_Spectator.m_OverviewData.insetWindowX ); // change viewport to inset window
1500-
pparams->viewport[1] = YRES( gHUD.m_Spectator.m_OverviewData.insetWindowY );
1501-
pparams->viewport[2] = XRES( gHUD.m_Spectator.m_OverviewData.insetWindowWidth );
1502-
pparams->viewport[3] = YRES( gHUD.m_Spectator.m_OverviewData.insetWindowHeight );
1499+
pparams->viewport[0] = XRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowX ); // change viewport to inset window
1500+
pparams->viewport[1] = YRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowY );
1501+
pparams->viewport[2] = XRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowWidth );
1502+
pparams->viewport[3] = YRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowHeight );
15031503
pparams->nextView = 0; // on further view
15041504

15051505
// override some settings in certain modes

0 commit comments

Comments
 (0)