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.

71 lines
1.6 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef VGUI_BUDGETPANELSHARED_H
  7. #define VGUI_BUDGETPANELSHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_basebudgetpanel.h"
  12. class IConVar;
  13. // Shared between the engine and dedicated server.
  14. class CBudgetPanelShared : public CBaseBudgetPanel
  15. {
  16. typedef CBaseBudgetPanel BaseClass;
  17. public:
  18. // budgetFlagsFilter is a combination of BUDGETFLAG_ defines that filters out which budget groups we are interested in.
  19. CBudgetPanelShared( vgui::Panel *pParent, const char *pElementName, int budgetFlagsFilter );
  20. ~CBudgetPanelShared();
  21. // Override this to set the window position.
  22. virtual void SetupCustomConfigData( CBudgetPanelConfigData &data );
  23. virtual void SetTimeLabelText();
  24. virtual void SetHistoryLabelText();
  25. virtual void PaintBackground();
  26. virtual void Paint( void );
  27. virtual void PostChildPaint();
  28. virtual void SnapshotVProfHistory( float filteredtime );
  29. // Command handlers
  30. void OnNumBudgetGroupsChanged( void );
  31. void SendConfigDataToBase();
  32. public:
  33. static double g_fFrameTimeLessBudget;
  34. static double g_fFrameRate;
  35. private:
  36. void DrawColoredText(
  37. vgui::HFont font,
  38. int x, int y,
  39. int r, int g, int b, int a,
  40. PRINTF_FORMAT_STRING const char *pText,
  41. ... ) FMTFUNCTION( 9, 10 );
  42. };
  43. // CVars that change the layout can hook this.
  44. void PanelGeometryChangedCallBack( IConVar *var, const char *pOldString, float flOldValue );
  45. #endif // VGUI_BUDGETPANELSHARED_H