From f56bb35301836e56582a575a75864392a0177875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 2 Dec 2013 19:31:46 -0800 Subject: Fix line endings. WHAMMY. --- mp/src/game/client/game_controls/IconPanel.cpp | 136 ++++++++++++------------- 1 file changed, 68 insertions(+), 68 deletions(-) (limited to 'mp/src/game/client/game_controls/IconPanel.cpp') diff --git a/mp/src/game/client/game_controls/IconPanel.cpp b/mp/src/game/client/game_controls/IconPanel.cpp index 88fb8071..3688daed 100644 --- a/mp/src/game/client/game_controls/IconPanel.cpp +++ b/mp/src/game/client/game_controls/IconPanel.cpp @@ -1,68 +1,68 @@ -//========= Copyright Valve Corporation, All rights reserved. ============// -// -// Purpose: -// -//=============================================================================// - -#include "cbase.h" -#include "IconPanel.h" -#include "KeyValues.h" - -DECLARE_BUILD_FACTORY( CIconPanel ); - -CIconPanel::CIconPanel( vgui::Panel *parent, const char *name ) : vgui::Panel( parent, name ) -{ - m_szIcon[0] = '\0'; - m_icon = NULL; - m_bScaleImage = false; -} - -void CIconPanel::ApplySettings( KeyValues *inResourceData ) -{ - Q_strncpy( m_szIcon, inResourceData->GetString( "icon", "" ), sizeof( m_szIcon ) ); - - m_icon = gHUD.GetIcon( m_szIcon ); - - m_bScaleImage = inResourceData->GetInt("scaleImage", 0); - - BaseClass::ApplySettings( inResourceData ); -} - -void CIconPanel::SetIcon( const char *szIcon ) -{ - Q_strncpy( m_szIcon, szIcon, sizeof(m_szIcon) ); - - m_icon = gHUD.GetIcon( m_szIcon ); -} - -void CIconPanel::Paint() -{ - BaseClass::Paint(); - - if ( m_icon ) - { - int x, y, w, h; - GetBounds( x, y, w, h ); - - if ( m_bScaleImage ) - { - m_icon->DrawSelf( 0, 0, w, h, m_IconColor ); - } - else - { - m_icon->DrawSelf( 0, 0, m_IconColor ); - } - } -} - -void CIconPanel::ApplySchemeSettings( vgui::IScheme *pScheme ) -{ - BaseClass::ApplySchemeSettings( pScheme ); - - if ( m_szIcon[0] != '\0' ) - { - m_icon = gHUD.GetIcon( m_szIcon ); - } - - SetFgColor( pScheme->GetColor( "FgColor", Color( 255, 255, 255, 255 ) ) ); -} +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "IconPanel.h" +#include "KeyValues.h" + +DECLARE_BUILD_FACTORY( CIconPanel ); + +CIconPanel::CIconPanel( vgui::Panel *parent, const char *name ) : vgui::Panel( parent, name ) +{ + m_szIcon[0] = '\0'; + m_icon = NULL; + m_bScaleImage = false; +} + +void CIconPanel::ApplySettings( KeyValues *inResourceData ) +{ + Q_strncpy( m_szIcon, inResourceData->GetString( "icon", "" ), sizeof( m_szIcon ) ); + + m_icon = gHUD.GetIcon( m_szIcon ); + + m_bScaleImage = inResourceData->GetInt("scaleImage", 0); + + BaseClass::ApplySettings( inResourceData ); +} + +void CIconPanel::SetIcon( const char *szIcon ) +{ + Q_strncpy( m_szIcon, szIcon, sizeof(m_szIcon) ); + + m_icon = gHUD.GetIcon( m_szIcon ); +} + +void CIconPanel::Paint() +{ + BaseClass::Paint(); + + if ( m_icon ) + { + int x, y, w, h; + GetBounds( x, y, w, h ); + + if ( m_bScaleImage ) + { + m_icon->DrawSelf( 0, 0, w, h, m_IconColor ); + } + else + { + m_icon->DrawSelf( 0, 0, m_IconColor ); + } + } +} + +void CIconPanel::ApplySchemeSettings( vgui::IScheme *pScheme ) +{ + BaseClass::ApplySchemeSettings( pScheme ); + + if ( m_szIcon[0] != '\0' ) + { + m_icon = gHUD.GetIcon( m_szIcon ); + } + + SetFgColor( pScheme->GetColor( "FgColor", Color( 255, 255, 255, 255 ) ) ); +} -- cgit v1.2.3