Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #if !defined( VGUI_BASEPANEL_H )
  14. #define VGUI_BASEPANEL_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. #include <vgui_controls/Panel.h>
  19. //-----------------------------------------------------------------------------
  20. // Purpose: Base Panel for engine vgui panels ( can handle some drawing stuff )
  21. //-----------------------------------------------------------------------------
  22. abstract_class CBasePanel : public vgui::Panel
  23. {
  24. typedef vgui::Panel BaseClass;
  25. public:
  26. CBasePanel( vgui::Panel *parent, char const *panelName );
  27. virtual ~CBasePanel( void );
  28. // should this panel be drawn this frame?
  29. virtual bool ShouldDraw( void ) = 0;
  30. virtual void OnTick( void );
  31. protected:
  32. };
  33. // Global version of the DrawColoredText function.
  34. void DrawColoredText( vgui::HFont font, int x, int y, int r, int g, int b, int a, const wchar_t *text );
  35. void DrawColoredText( vgui::HFont font, int x, int y, Color clr, const wchar_t *text );
  36. void DrawCenteredColoredText( vgui::HFont font, int left, int top, int right, int bottom, Color clr, const wchar_t *text );
  37. int DrawTextLen( vgui::HFont font, const wchar_t *text );
  38. #endif // VGUI_BASEPANEL_H