summaryrefslogtreecommitdiff
path: root/game/client/replay/vgui/replayreminderpanel.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/replay/vgui/replayreminderpanel.h')
-rw-r--r--game/client/replay/vgui/replayreminderpanel.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/game/client/replay/vgui/replayreminderpanel.h b/game/client/replay/vgui/replayreminderpanel.h
new file mode 100644
index 0000000..ede6490
--- /dev/null
+++ b/game/client/replay/vgui/replayreminderpanel.h
@@ -0,0 +1,50 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef REPLAYREMINDERPANEL_H
+#define REPLAYREMINDERPANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/EditablePanel.h>
+#include <game/client/iviewport.h>
+#include <vgui/IScheme.h>
+#include "hud.h"
+#include "hudelement.h"
+
+using namespace vgui;
+
+//-----------------------------------------------------------------------------
+// Purpose: Replay reminder panel
+//-----------------------------------------------------------------------------
+class CReplayReminderPanel : public EditablePanel, public CHudElement
+{
+ DECLARE_CLASS_SIMPLE( CReplayReminderPanel, vgui::EditablePanel );
+public:
+ CReplayReminderPanel( const char *pElementName );
+
+ void Hide(); // To be used by HUD only
+ void Show(); // To be used by HUD only
+
+ // CHudElement overrides
+ virtual bool ShouldDraw();
+ virtual void OnThink();
+ virtual int HudElementKeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding );
+
+ // EditablePanel overrides
+ virtual void ApplySchemeSettings( IScheme *pScheme );
+ virtual void SetVisible( bool bState );
+
+private:
+ void SetupText();
+
+ float m_flShowTime; // Used by the HUD only, to display the panel only for a certain period of time
+ bool m_bShouldDraw; // Store this state for ShouldDraw(), which allows us to use a single panel for
+ // both the post-win reminder and the freezepanel reminder.
+};
+
+#endif // REPLAYREMINDERPANEL_H