summaryrefslogtreecommitdiff
path: root/game/client/tf2/c_tf2rootpanel.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/tf2/c_tf2rootpanel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/tf2/c_tf2rootpanel.h')
-rw-r--r--game/client/tf2/c_tf2rootpanel.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/game/client/tf2/c_tf2rootpanel.h b/game/client/tf2/c_tf2rootpanel.h
new file mode 100644
index 0000000..264475e
--- /dev/null
+++ b/game/client/tf2/c_tf2rootpanel.h
@@ -0,0 +1,63 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef C_TF2ROOTPANEL_H
+#define C_TF2ROOTPANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Panel.h>
+#include <vgui_controls/EditablePanel.h>
+#include "utlvector.h"
+
+class CPanelEffect;
+class ITFHintItem;
+
+// 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_TF2RootPanel : public vgui::Panel
+{
+ typedef vgui::Panel BaseClass;
+public:
+ C_TF2RootPanel( vgui::VPANEL parent );
+ virtual ~C_TF2RootPanel( void );
+
+ // Draw Panel effects here
+ virtual void PostChildPaint();
+
+ // Clear list of Panel Effects
+ virtual void LevelInit( void );
+ virtual void LevelShutdown( void );
+
+ // Panel Effect handlers
+ EFFECT_HANDLE AddEffect( CPanelEffect *effect );
+ void RemoveEffect( EFFECT_HANDLE handle );
+ CPanelEffect *FindEffect( EFFECT_HANDLE handle );
+ void DestroyPanelEffects( ITFHintItem *owner );
+ void ClearAllEffects( 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;
+};
+
+extern C_TF2RootPanel *g_pTF2RootPanel;
+
+#endif // C_TF2ROOTPANEL_H