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.

44 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef HUD_TF_CROSSHAIR_H
  8. #define HUD_TF_CROSSHAIR_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "hud_crosshair.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose:
  15. //-----------------------------------------------------------------------------
  16. class CHudTFCrosshair : public CHudCrosshair
  17. {
  18. public:
  19. DECLARE_CLASS_SIMPLE( CHudTFCrosshair, CHudCrosshair );
  20. CHudTFCrosshair( const char *name );
  21. virtual ~CHudTFCrosshair( void );
  22. virtual void Init() OVERRIDE;
  23. virtual void LevelShutdown( void ) OVERRIDE;
  24. virtual bool ShouldDraw() OVERRIDE;
  25. protected:
  26. virtual void Paint() OVERRIDE;
  27. virtual void FireGameEvent( IGameEvent * event ) OVERRIDE;
  28. private:
  29. int m_iCrosshairTextureID;
  30. IVguiMatInfo *m_pCrosshairMaterial;
  31. char m_szPreviousCrosshair[256]; // name of the current crosshair
  32. float m_flTimeToHideUntil;
  33. };
  34. #endif // HUD_TF_CROSSHAIR_H