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.

56 lines
1.4 KiB

  1. //========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ACHIEVEMENT_NOTIFICATION_PANEL_H
  8. #define ACHIEVEMENT_NOTIFICATION_PANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/EditablePanel.h>
  13. #include "hudelement.h"
  14. using namespace vgui;
  15. class CAchievementNotificationPanel : public CHudElement, public EditablePanel
  16. {
  17. DECLARE_CLASS_SIMPLE( CAchievementNotificationPanel, EditablePanel );
  18. public:
  19. explicit CAchievementNotificationPanel( const char *pElementName );
  20. virtual void Init();
  21. virtual void ApplySchemeSettings( IScheme *scheme );
  22. virtual bool ShouldDraw( void );
  23. virtual void PerformLayout( void );
  24. virtual void LevelInit( void ) { m_flHideTime = 0; }
  25. virtual void FireGameEvent( IGameEvent * event );
  26. virtual void OnTick( void );
  27. void AddNotification( const char *szIconBaseName, const wchar_t *pHeading, const wchar_t *pTitle );
  28. private:
  29. void ShowNextNotification();
  30. void SetXAndWide( Panel *pPanel, int x, int wide );
  31. float m_flHideTime;
  32. Label *m_pLabelHeading;
  33. Label *m_pLabelTitle;
  34. EditablePanel *m_pPanelBackground;
  35. ImagePanel *m_pIcon;
  36. struct Notification_t
  37. {
  38. char szIconBaseName[255];
  39. wchar_t szHeading[255];
  40. wchar_t szTitle[255];
  41. };
  42. CUtlLinkedList<Notification_t> m_queueNotification;
  43. };
  44. #endif // ACHIEVEMENT_NOTIFICATION_PANEL_H