diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp')
| -rw-r--r-- | mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp b/mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp index 65163609..67f47148 100644 --- a/mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp +++ b/mp/src/game/client/hl2mp/hl2mp_hud_chat.cpp @@ -1,116 +1,116 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#include "cbase.h"
-#include "hl2mp_hud_chat.h"
-#include "hud_macros.h"
-#include "text_message.h"
-#include "vguicenterprint.h"
-#include "vgui/ILocalize.h"
-#include "c_team.h"
-#include "c_playerresource.h"
-#include "c_hl2mp_player.h"
-#include "hl2mp_gamerules.h"
-#include "ihudlcd.h"
-
-
-
-DECLARE_HUDELEMENT( CHudChat );
-
-DECLARE_HUD_MESSAGE( CHudChat, SayText );
-DECLARE_HUD_MESSAGE( CHudChat, SayText2 );
-DECLARE_HUD_MESSAGE( CHudChat, TextMsg );
-
-
-//=====================
-//CHudChatLine
-//=====================
-
-void CHudChatLine::ApplySchemeSettings(vgui::IScheme *pScheme)
-{
- BaseClass::ApplySchemeSettings( pScheme );
-}
-
-//=====================
-//CHudChatInputLine
-//=====================
-
-void CHudChatInputLine::ApplySchemeSettings(vgui::IScheme *pScheme)
-{
- BaseClass::ApplySchemeSettings(pScheme);
-}
-
-//=====================
-//CHudChat
-//=====================
-
-CHudChat::CHudChat( const char *pElementName ) : BaseClass( pElementName )
-{
-
-}
-
-void CHudChat::CreateChatInputLine( void )
-{
- m_pChatInput = new CHudChatInputLine( this, "ChatInputLine" );
- m_pChatInput->SetVisible( false );
-}
-
-void CHudChat::CreateChatLines( void )
-{
- m_ChatLine = new CHudChatLine( this, "ChatLine1" );
- m_ChatLine->SetVisible( false );
-}
-
-void CHudChat::ApplySchemeSettings( vgui::IScheme *pScheme )
-{
- BaseClass::ApplySchemeSettings( pScheme );
-}
-
-
-void CHudChat::Init( void )
-{
- BaseClass::Init();
-
- HOOK_HUD_MESSAGE( CHudChat, SayText );
- HOOK_HUD_MESSAGE( CHudChat, SayText2 );
- HOOK_HUD_MESSAGE( CHudChat, TextMsg );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Overrides base reset to not cancel chat at round restart
-//-----------------------------------------------------------------------------
-void CHudChat::Reset( void )
-{
-}
-
-int CHudChat::GetChatInputOffset( void )
-{
- if ( m_pChatInput->IsVisible() )
- {
- return m_iFontHeight;
- }
- else
- return 0;
-}
-
-Color CHudChat::GetClientColor( int clientIndex )
-{
- if ( clientIndex == 0 ) // console msg
- {
- return g_ColorYellow;
- }
- else if( g_PR )
- {
- switch ( g_PR->GetTeam( clientIndex ) )
- {
- case TEAM_COMBINE : return g_ColorBlue;
- case TEAM_REBELS : return g_ColorRed;
- default : return g_ColorYellow;
- }
- }
-
- return g_ColorYellow;
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "cbase.h" +#include "hl2mp_hud_chat.h" +#include "hud_macros.h" +#include "text_message.h" +#include "vguicenterprint.h" +#include "vgui/ILocalize.h" +#include "c_team.h" +#include "c_playerresource.h" +#include "c_hl2mp_player.h" +#include "hl2mp_gamerules.h" +#include "ihudlcd.h" + + + +DECLARE_HUDELEMENT( CHudChat ); + +DECLARE_HUD_MESSAGE( CHudChat, SayText ); +DECLARE_HUD_MESSAGE( CHudChat, SayText2 ); +DECLARE_HUD_MESSAGE( CHudChat, TextMsg ); + + +//===================== +//CHudChatLine +//===================== + +void CHudChatLine::ApplySchemeSettings(vgui::IScheme *pScheme) +{ + BaseClass::ApplySchemeSettings( pScheme ); +} + +//===================== +//CHudChatInputLine +//===================== + +void CHudChatInputLine::ApplySchemeSettings(vgui::IScheme *pScheme) +{ + BaseClass::ApplySchemeSettings(pScheme); +} + +//===================== +//CHudChat +//===================== + +CHudChat::CHudChat( const char *pElementName ) : BaseClass( pElementName ) +{ + +} + +void CHudChat::CreateChatInputLine( void ) +{ + m_pChatInput = new CHudChatInputLine( this, "ChatInputLine" ); + m_pChatInput->SetVisible( false ); +} + +void CHudChat::CreateChatLines( void ) +{ + m_ChatLine = new CHudChatLine( this, "ChatLine1" ); + m_ChatLine->SetVisible( false ); +} + +void CHudChat::ApplySchemeSettings( vgui::IScheme *pScheme ) +{ + BaseClass::ApplySchemeSettings( pScheme ); +} + + +void CHudChat::Init( void ) +{ + BaseClass::Init(); + + HOOK_HUD_MESSAGE( CHudChat, SayText ); + HOOK_HUD_MESSAGE( CHudChat, SayText2 ); + HOOK_HUD_MESSAGE( CHudChat, TextMsg ); +} + +//----------------------------------------------------------------------------- +// Purpose: Overrides base reset to not cancel chat at round restart +//----------------------------------------------------------------------------- +void CHudChat::Reset( void ) +{ +} + +int CHudChat::GetChatInputOffset( void ) +{ + if ( m_pChatInput->IsVisible() ) + { + return m_iFontHeight; + } + else + return 0; +} + +Color CHudChat::GetClientColor( int clientIndex ) +{ + if ( clientIndex == 0 ) // console msg + { + return g_ColorYellow; + } + else if( g_PR ) + { + switch ( g_PR->GetTeam( clientIndex ) ) + { + case TEAM_COMBINE : return g_ColorBlue; + case TEAM_REBELS : return g_ColorRed; + default : return g_ColorYellow; + } + } + + return g_ColorYellow; }
\ No newline at end of file |