summaryrefslogtreecommitdiff
path: root/engine/vgui_basepanel.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 /engine/vgui_basepanel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'engine/vgui_basepanel.h')
-rw-r--r--engine/vgui_basepanel.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/engine/vgui_basepanel.h b/engine/vgui_basepanel.h
new file mode 100644
index 0000000..db932df
--- /dev/null
+++ b/engine/vgui_basepanel.h
@@ -0,0 +1,47 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#if !defined( VGUI_BASEPANEL_H )
+#define VGUI_BASEPANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Panel.h>
+
+//-----------------------------------------------------------------------------
+// Purpose: Base Panel for engine vgui panels ( can handle some drawing stuff )
+//-----------------------------------------------------------------------------
+abstract_class CBasePanel : public vgui::Panel
+{
+ typedef vgui::Panel BaseClass;
+
+public:
+ CBasePanel( vgui::Panel *parent, char const *panelName );
+ virtual ~CBasePanel( void );
+
+ // should this panel be drawn this frame?
+ virtual bool ShouldDraw( void ) = 0;
+ virtual void OnTick( void );
+
+protected:
+};
+
+
+// Global version of the DrawColoredText function.
+int DrawColoredText( vgui::HFont font, int x, int y, int r, int g, int b, int a, const wchar_t *text );
+int DrawColoredText( vgui::HFont font, int x, int y, Color clr, const wchar_t *text );
+int DrawCenteredColoredText( vgui::HFont font, int left, int top, int right, int bottom, Color clr, const wchar_t *text );
+int DrawTextLen( vgui::HFont font, const wchar_t *text );
+
+
+#endif // VGUI_BASEPANEL_H