Team Fortress 2 Source Code as on 22/4/2020
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.

50 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef REPLAYREMINDERPANEL_H
  7. #define REPLAYREMINDERPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <vgui_controls/EditablePanel.h>
  12. #include <game/client/iviewport.h>
  13. #include <vgui/IScheme.h>
  14. #include "hud.h"
  15. #include "hudelement.h"
  16. using namespace vgui;
  17. //-----------------------------------------------------------------------------
  18. // Purpose: Replay reminder panel
  19. //-----------------------------------------------------------------------------
  20. class CReplayReminderPanel : public EditablePanel, public CHudElement
  21. {
  22. DECLARE_CLASS_SIMPLE( CReplayReminderPanel, vgui::EditablePanel );
  23. public:
  24. CReplayReminderPanel( const char *pElementName );
  25. void Hide(); // To be used by HUD only
  26. void Show(); // To be used by HUD only
  27. // CHudElement overrides
  28. virtual bool ShouldDraw();
  29. virtual void OnThink();
  30. virtual int HudElementKeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding );
  31. // EditablePanel overrides
  32. virtual void ApplySchemeSettings( IScheme *pScheme );
  33. virtual void SetVisible( bool bState );
  34. private:
  35. void SetupText();
  36. float m_flShowTime; // Used by the HUD only, to display the panel only for a certain period of time
  37. bool m_bShouldDraw; // Store this state for ShouldDraw(), which allows us to use a single panel for
  38. // both the post-win reminder and the freezepanel reminder.
  39. };
  40. #endif // REPLAYREMINDERPANEL_H