game/client: make font size proportional
This commit is contained in:
parent
2e7fa2dfc8
commit
898716f600
@ -820,6 +820,8 @@ CHudCloseCaption::CHudCloseCaption( const char *pElementName )
|
||||
vgui::Panel *pParent = g_pClientMode->GetViewport();
|
||||
SetParent( pParent );
|
||||
|
||||
SetProportional( true );
|
||||
|
||||
m_nGoalHeight = 0;
|
||||
m_nCurrentHeight = 0;
|
||||
m_flGoalAlpha = 1.0f;
|
||||
@ -1575,17 +1577,17 @@ void CHudCloseCaption::CreateFonts( void )
|
||||
{
|
||||
vgui::IScheme *pScheme = vgui::scheme()->GetIScheme( GetScheme() );
|
||||
|
||||
m_hFonts[CCFONT_NORMAL] = pScheme->GetFont( "CloseCaption_Normal" );
|
||||
m_hFonts[CCFONT_NORMAL] = pScheme->GetFont( "CloseCaption_Normal", true );
|
||||
|
||||
if ( IsPC() )
|
||||
{
|
||||
m_hFonts[CCFONT_BOLD] = pScheme->GetFont( "CloseCaption_Bold" );
|
||||
m_hFonts[CCFONT_ITALIC] = pScheme->GetFont( "CloseCaption_Italic" );
|
||||
m_hFonts[CCFONT_ITALICBOLD] = pScheme->GetFont( "CloseCaption_BoldItalic" );
|
||||
m_hFonts[CCFONT_BOLD] = pScheme->GetFont( "CloseCaption_Bold", true );
|
||||
m_hFonts[CCFONT_ITALIC] = pScheme->GetFont( "CloseCaption_Italic", true );
|
||||
m_hFonts[CCFONT_ITALICBOLD] = pScheme->GetFont( "CloseCaption_BoldItalic", true );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_hFonts[CCFONT_SMALL] = pScheme->GetFont( "CloseCaption_Small" );
|
||||
m_hFonts[CCFONT_SMALL] = pScheme->GetFont( "CloseCaption_Small", true );
|
||||
}
|
||||
|
||||
m_nLineHeight = MAX( 6, vgui::surface()->GetFontTall( m_hFonts[ CCFONT_NORMAL ] ) );
|
||||
|
Loading…
Reference in New Issue
Block a user