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.

42 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef TF_HUD_INSPECTPANEL_H
  7. #define TF_HUD_INSPECTPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. using namespace vgui;
  12. //-----------------------------------------------------------------------------
  13. // Purpose:
  14. //-----------------------------------------------------------------------------
  15. class CHudInspectPanel : public CHudElement, public EditablePanel
  16. {
  17. DECLARE_CLASS_SIMPLE( CHudInspectPanel, EditablePanel );
  18. public:
  19. CHudInspectPanel( const char *pElementName );
  20. virtual void ApplySchemeSettings( IScheme *scheme );
  21. virtual bool ShouldDraw( void );
  22. virtual int GetRenderGroupPriority( void ) { return 35; } // less than statpanel
  23. void UserCmd_InspectTarget( void );
  24. C_TFPlayer *GetInspectTarget( C_TFPlayer *pLocalTFPlayer );
  25. int HudElementKeyInput( int down, ButtonCode_t keynum, const char *pszCurrentBinding );
  26. private:
  27. void LockInspectRenderGroup( bool bLock );
  28. void SetPanelVisible( bool bVisible );
  29. CItemModelPanel *m_pItemPanel;
  30. CHandle<C_TFPlayer> m_hTarget;
  31. int m_iTargetItemIterator;
  32. };
  33. #endif // TF_HUD_INSPECTPANEL_H