aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/achievement_notification_panel.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/game/client/achievement_notification_panel.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/client/achievement_notification_panel.h')
-rw-r--r--sp/src/game/client/achievement_notification_panel.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/sp/src/game/client/achievement_notification_panel.h b/sp/src/game/client/achievement_notification_panel.h
new file mode 100644
index 00000000..88ed358f
--- /dev/null
+++ b/sp/src/game/client/achievement_notification_panel.h
@@ -0,0 +1,57 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef ACHIEVEMENT_NOTIFICATION_PANEL_H
+#define ACHIEVEMENT_NOTIFICATION_PANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/EditablePanel.h>
+#include "hudelement.h"
+
+using namespace vgui;
+
+class CAchievementNotificationPanel : public CHudElement, public EditablePanel
+{
+ DECLARE_CLASS_SIMPLE( CAchievementNotificationPanel, EditablePanel );
+
+public:
+ CAchievementNotificationPanel( const char *pElementName );
+
+ virtual void Init();
+ virtual void ApplySchemeSettings( IScheme *scheme );
+ virtual bool ShouldDraw( void );
+ virtual void PerformLayout( void );
+ virtual void LevelInit( void ) { m_flHideTime = 0; }
+ virtual void FireGameEvent( IGameEvent * event );
+ virtual void OnTick( void );
+
+ void AddNotification( const char *szIconBaseName, const wchar_t *pHeading, const wchar_t *pTitle );
+
+private:
+ void ShowNextNotification();
+ void SetXAndWide( Panel *pPanel, int x, int wide );
+
+ float m_flHideTime;
+
+ Label *m_pLabelHeading;
+ Label *m_pLabelTitle;
+ EditablePanel *m_pPanelBackground;
+ ImagePanel *m_pIcon;
+
+ struct Notification_t
+ {
+ char szIconBaseName[255];
+ wchar_t szHeading[255];
+ wchar_t szTitle[255];
+ };
+
+ CUtlLinkedList<Notification_t> m_queueNotification;
+};
+
+#endif // ACHIEVEMENT_NOTIFICATION_PANEL_H \ No newline at end of file