aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/sdk/vgui
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/client/sdk/vgui
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/client/sdk/vgui')
-rw-r--r--sp/src/game/client/sdk/vgui/sdkviewport.cpp170
-rw-r--r--sp/src/game/client/sdk/vgui/sdkviewport.h80
-rw-r--r--sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp212
-rw-r--r--sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.h112
4 files changed, 287 insertions, 287 deletions
diff --git a/sp/src/game/client/sdk/vgui/sdkviewport.cpp b/sp/src/game/client/sdk/vgui/sdkviewport.cpp
index 02bf368f..5fd3627e 100644
--- a/sp/src/game/client/sdk/vgui/sdkviewport.cpp
+++ b/sp/src/game/client/sdk/vgui/sdkviewport.cpp
@@ -1,85 +1,85 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: Client DLL VGUI2 Viewport
-//
-// $Workfile: $
-// $Date: $
-//
-//-----------------------------------------------------------------------------
-// $Log: $
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#include "cbase.h"
-
-#pragma warning( disable : 4800 ) // disable forcing int to bool performance warning
-
-// VGUI panel includes
-#include <vgui_controls/Panel.h>
-#include <vgui/ISurface.h>
-#include <KeyValues.h>
-#include <vgui/Cursor.h>
-#include <vgui/IScheme.h>
-#include <vgui/IVGui.h>
-#include <vgui/ILocalize.h>
-#include <vgui/VGUI.h>
-
-// client dll/engine defines
-#include "hud.h"
-#include <voice_status.h>
-
-// viewport definitions
-#include <baseviewport.h>
-#include "SDKViewport.h"
-
-#include "vguicenterprint.h"
-#include "text_message.h"
-
-
-void SDKViewport::ApplySchemeSettings( vgui::IScheme *pScheme )
-{
- BaseClass::ApplySchemeSettings( pScheme );
-
- gHUD.InitColors( pScheme );
-
- SetPaintBackgroundEnabled( false );
-}
-
-
-IViewPortPanel* SDKViewport::CreatePanelByName(const char *szPanelName)
-{
- IViewPortPanel* newpanel = NULL;
-
-// Up here, strcmp against each type of panel we know how to create.
-// else if ( Q_strcmp(PANEL_OVERVIEW, szPanelName) == 0 )
-// {
-// newpanel = new CCSMapOverview( this );
-// }
-
- // create a generic base panel, don't add twice
- newpanel = BaseClass::CreatePanelByName( szPanelName );
-
- return newpanel;
-}
-
-void SDKViewport::CreateDefaultPanels( void )
-{
- BaseClass::CreateDefaultPanels();
-}
-
-int SDKViewport::GetDeathMessageStartHeight( void )
-{
- int x = YRES(2);
-
- IViewPortPanel *spectator = gViewPortInterface->FindPanelByName( PANEL_SPECGUI );
-
- //TODO: Link to actual height of spectator bar
- if ( spectator && spectator->IsVisible() )
- {
- x += YRES(52);
- }
-
- return x;
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Client DLL VGUI2 Viewport
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#include "cbase.h"
+
+#pragma warning( disable : 4800 ) // disable forcing int to bool performance warning
+
+// VGUI panel includes
+#include <vgui_controls/Panel.h>
+#include <vgui/ISurface.h>
+#include <KeyValues.h>
+#include <vgui/Cursor.h>
+#include <vgui/IScheme.h>
+#include <vgui/IVGui.h>
+#include <vgui/ILocalize.h>
+#include <vgui/VGUI.h>
+
+// client dll/engine defines
+#include "hud.h"
+#include <voice_status.h>
+
+// viewport definitions
+#include <baseviewport.h>
+#include "SDKViewport.h"
+
+#include "vguicenterprint.h"
+#include "text_message.h"
+
+
+void SDKViewport::ApplySchemeSettings( vgui::IScheme *pScheme )
+{
+ BaseClass::ApplySchemeSettings( pScheme );
+
+ gHUD.InitColors( pScheme );
+
+ SetPaintBackgroundEnabled( false );
+}
+
+
+IViewPortPanel* SDKViewport::CreatePanelByName(const char *szPanelName)
+{
+ IViewPortPanel* newpanel = NULL;
+
+// Up here, strcmp against each type of panel we know how to create.
+// else if ( Q_strcmp(PANEL_OVERVIEW, szPanelName) == 0 )
+// {
+// newpanel = new CCSMapOverview( this );
+// }
+
+ // create a generic base panel, don't add twice
+ newpanel = BaseClass::CreatePanelByName( szPanelName );
+
+ return newpanel;
+}
+
+void SDKViewport::CreateDefaultPanels( void )
+{
+ BaseClass::CreateDefaultPanels();
+}
+
+int SDKViewport::GetDeathMessageStartHeight( void )
+{
+ int x = YRES(2);
+
+ IViewPortPanel *spectator = gViewPortInterface->FindPanelByName( PANEL_SPECGUI );
+
+ //TODO: Link to actual height of spectator bar
+ if ( spectator && spectator->IsVisible() )
+ {
+ x += YRES(52);
+ }
+
+ return x;
+}
+
diff --git a/sp/src/game/client/sdk/vgui/sdkviewport.h b/sp/src/game/client/sdk/vgui/sdkviewport.h
index 34bdd120..159da392 100644
--- a/sp/src/game/client/sdk/vgui/sdkviewport.h
+++ b/sp/src/game/client/sdk/vgui/sdkviewport.h
@@ -1,40 +1,40 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//=============================================================================//
-
-#ifndef SDKVIEWPORT_H
-#define SDKVIEWPORT_H
-
-
-#include "sdk_shareddefs.h"
-#include "baseviewport.h"
-
-
-using namespace vgui;
-
-namespace vgui
-{
- class Panel;
-}
-
-class SDKViewport : public CBaseViewport
-{
-
-private:
- DECLARE_CLASS_SIMPLE( SDKViewport, CBaseViewport );
-
-public:
-
- IViewPortPanel* CreatePanelByName(const char *szPanelName);
- void CreateDefaultPanels( void );
-
- virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
-
- int GetDeathMessageStartHeight( void );
-};
-
-
-#endif // SDKViewport_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef SDKVIEWPORT_H
+#define SDKVIEWPORT_H
+
+
+#include "sdk_shareddefs.h"
+#include "baseviewport.h"
+
+
+using namespace vgui;
+
+namespace vgui
+{
+ class Panel;
+}
+
+class SDKViewport : public CBaseViewport
+{
+
+private:
+ DECLARE_CLASS_SIMPLE( SDKViewport, CBaseViewport );
+
+public:
+
+ IViewPortPanel* CreatePanelByName(const char *szPanelName);
+ void CreateDefaultPanels( void );
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+
+ int GetDeathMessageStartHeight( void );
+};
+
+
+#endif // SDKViewport_H
diff --git a/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp b/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
index 8b81d37d..e756829d 100644
--- a/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
+++ b/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
@@ -1,106 +1,106 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//=============================================================================//
-#include "cbase.h"
-#include "vgui_int.h"
-#include "ienginevgui.h"
-#include "vgui_rootpanel_sdk.h"
-#include "vgui/IVGui.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-C_SDKRootPanel *g_pRootPanel = NULL;
-
-
-//-----------------------------------------------------------------------------
-// Global functions.
-//-----------------------------------------------------------------------------
-void VGUI_CreateClientDLLRootPanel( void )
-{
- g_pRootPanel = new C_SDKRootPanel( enginevgui->GetPanel( PANEL_CLIENTDLL ) );
-}
-
-void VGUI_DestroyClientDLLRootPanel( void )
-{
- delete g_pRootPanel;
- g_pRootPanel = NULL;
-}
-
-vgui::VPANEL VGui_GetClientDLLRootPanel( void )
-{
- return g_pRootPanel->GetVPanel();
-}
-
-
-//-----------------------------------------------------------------------------
-// C_SDKRootPanel implementation.
-//-----------------------------------------------------------------------------
-C_SDKRootPanel::C_SDKRootPanel( vgui::VPANEL parent )
- : BaseClass( NULL, "SDK Root Panel" )
-{
- SetParent( parent );
- SetPaintEnabled( false );
- SetPaintBorderEnabled( false );
- SetPaintBackgroundEnabled( false );
-
- // This panel does post child painting
- SetPostChildPaintEnabled( true );
-
- // Make it screen sized
- SetBounds( 0, 0, ScreenWidth(), ScreenHeight() );
-
- // Ask for OnTick messages
- vgui::ivgui()->AddTickSignal( GetVPanel() );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-C_SDKRootPanel::~C_SDKRootPanel( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void C_SDKRootPanel::PostChildPaint()
-{
- BaseClass::PostChildPaint();
-
- // Draw all panel effects
- RenderPanelEffects();
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: For each panel effect, check if it wants to draw and draw it on
-// this panel/surface if so
-//-----------------------------------------------------------------------------
-void C_SDKRootPanel::RenderPanelEffects( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void C_SDKRootPanel::OnTick( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Reset effects on level load/shutdown
-//-----------------------------------------------------------------------------
-void C_SDKRootPanel::LevelInit( void )
-{
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void C_SDKRootPanel::LevelShutdown( void )
-{
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "vgui_int.h"
+#include "ienginevgui.h"
+#include "vgui_rootpanel_sdk.h"
+#include "vgui/IVGui.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+C_SDKRootPanel *g_pRootPanel = NULL;
+
+
+//-----------------------------------------------------------------------------
+// Global functions.
+//-----------------------------------------------------------------------------
+void VGUI_CreateClientDLLRootPanel( void )
+{
+ g_pRootPanel = new C_SDKRootPanel( enginevgui->GetPanel( PANEL_CLIENTDLL ) );
+}
+
+void VGUI_DestroyClientDLLRootPanel( void )
+{
+ delete g_pRootPanel;
+ g_pRootPanel = NULL;
+}
+
+vgui::VPANEL VGui_GetClientDLLRootPanel( void )
+{
+ return g_pRootPanel->GetVPanel();
+}
+
+
+//-----------------------------------------------------------------------------
+// C_SDKRootPanel implementation.
+//-----------------------------------------------------------------------------
+C_SDKRootPanel::C_SDKRootPanel( vgui::VPANEL parent )
+ : BaseClass( NULL, "SDK Root Panel" )
+{
+ SetParent( parent );
+ SetPaintEnabled( false );
+ SetPaintBorderEnabled( false );
+ SetPaintBackgroundEnabled( false );
+
+ // This panel does post child painting
+ SetPostChildPaintEnabled( true );
+
+ // Make it screen sized
+ SetBounds( 0, 0, ScreenWidth(), ScreenHeight() );
+
+ // Ask for OnTick messages
+ vgui::ivgui()->AddTickSignal( GetVPanel() );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_SDKRootPanel::~C_SDKRootPanel( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::PostChildPaint()
+{
+ BaseClass::PostChildPaint();
+
+ // Draw all panel effects
+ RenderPanelEffects();
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: For each panel effect, check if it wants to draw and draw it on
+// this panel/surface if so
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::RenderPanelEffects( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::OnTick( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Reset effects on level load/shutdown
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::LevelInit( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::LevelShutdown( void )
+{
+}
+
diff --git a/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.h b/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.h
index 0e7c9b80..448abbc7 100644
--- a/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.h
+++ b/sp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.h
@@ -1,56 +1,56 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#ifndef VGUI_ROOTPANEL_SDK_H
-#define VGUI_ROOTPANEL_SDK_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-#include <vgui_controls/Panel.h>
-#include <vgui_controls/EditablePanel.h>
-#include "utlvector.h"
-
-
-class CPanelEffect;
-
-
-// Serial under of effect, for safe lookup
-typedef unsigned int EFFECT_HANDLE;
-
-//-----------------------------------------------------------------------------
-// Purpose: Sits between engine and client .dll panels
-// Responsible for drawing screen overlays
-//-----------------------------------------------------------------------------
-class C_SDKRootPanel : public vgui::Panel
-{
- typedef vgui::Panel BaseClass;
-public:
- C_SDKRootPanel( vgui::VPANEL parent );
- virtual ~C_SDKRootPanel( void );
-
- // Draw Panel effects here
- virtual void PostChildPaint();
-
- // Clear list of Panel Effects
- virtual void LevelInit( void );
- virtual void LevelShutdown( void );
-
- // Run effects and let them decide whether to remove themselves
- void OnTick( void );
-
-private:
-
- // Render all panel effects
- void RenderPanelEffects( void );
-
- // List of current panel effects
- CUtlVector< CPanelEffect *> m_Effects;
-};
-
-
-#endif // VGUI_ROOTPANEL_SDK_H
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef VGUI_ROOTPANEL_SDK_H
+#define VGUI_ROOTPANEL_SDK_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include <vgui_controls/Panel.h>
+#include <vgui_controls/EditablePanel.h>
+#include "utlvector.h"
+
+
+class CPanelEffect;
+
+
+// Serial under of effect, for safe lookup
+typedef unsigned int EFFECT_HANDLE;
+
+//-----------------------------------------------------------------------------
+// Purpose: Sits between engine and client .dll panels
+// Responsible for drawing screen overlays
+//-----------------------------------------------------------------------------
+class C_SDKRootPanel : public vgui::Panel
+{
+ typedef vgui::Panel BaseClass;
+public:
+ C_SDKRootPanel( vgui::VPANEL parent );
+ virtual ~C_SDKRootPanel( void );
+
+ // Draw Panel effects here
+ virtual void PostChildPaint();
+
+ // Clear list of Panel Effects
+ virtual void LevelInit( void );
+ virtual void LevelShutdown( void );
+
+ // Run effects and let them decide whether to remove themselves
+ void OnTick( void );
+
+private:
+
+ // Render all panel effects
+ void RenderPanelEffects( void );
+
+ // List of current panel effects
+ CUtlVector< CPanelEffect *> m_Effects;
+};
+
+
+#endif // VGUI_ROOTPANEL_SDK_H