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.

66 lines
1.3 KiB

  1. //===== Copyright � 1996-2008, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: Tip display during level loads.
  4. //
  5. //===========================================================================//
  6. #ifndef LOADING_TIP_PANEL_H
  7. #define LOADING_TIP_PANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/imagepanel.h"
  12. #include "vgui_controls/editablepanel.h"
  13. #include "vgui_controls/label.h"
  14. #define MAX_TIP_LENGTH 64
  15. struct sTipInfo
  16. {
  17. char szTipTitle[MAX_TIP_LENGTH];
  18. char szTipString[MAX_TIP_LENGTH];
  19. char szTipImage[MAX_TIP_LENGTH];
  20. };
  21. enum eTipMode
  22. {
  23. TIP_MODE_SURVIVOR,
  24. TIP_MODE_INFECTED,
  25. TIP_MODE_ACHIEVEMENTS,
  26. TIP_MODE_COUNT,
  27. };
  28. class CLoadingTipPanel : public vgui::EditablePanel
  29. {
  30. DECLARE_CLASS_SIMPLE( CLoadingTipPanel, vgui::EditablePanel )
  31. public:
  32. CLoadingTipPanel( Panel *pParent );
  33. ~CLoadingTipPanel();
  34. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  35. virtual void PaintBackground( void );
  36. void ReloadScheme( void );
  37. void NextTip( void );
  38. private:
  39. void SetupTips( void );
  40. int DrawSmearBackgroundFade( int x, int y, int wide, int tall );
  41. Color m_smearColor;
  42. vgui::ImagePanel *m_pTipIcon;
  43. CUtlVector< sTipInfo > m_Tips;
  44. float m_flLastTipTime;
  45. int m_iCurrentTip;
  46. };
  47. void PrecacheLoadingTipIcons();
  48. #endif // LOADING_TIP_PANEL_H