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.

43 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef MODELIMAGEPANEL_H
  7. #define MODELIMAGEPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "basemodel_panel.h"
  12. class CIconRenderReceiver;
  13. class CModelImagePanel : public CBaseModelPanel
  14. {
  15. DECLARE_CLASS_SIMPLE( CModelImagePanel, CBaseModelPanel );
  16. public:
  17. // Constructor, Destructor.
  18. CModelImagePanel( vgui::Panel *pParent, const char *pName );
  19. virtual ~CModelImagePanel();
  20. virtual void PerformLayout() OVERRIDE;
  21. virtual void Paint() OVERRIDE;
  22. virtual void OnSizeChanged( int wide, int tall ) OVERRIDE;
  23. virtual void SetMDL( MDLHandle_t handle, void *pProxyData = NULL ) OVERRIDE;
  24. virtual void SetMDL( const char *pMDLName, void *pProxyData = NULL ) OVERRIDE;
  25. void SetMDLBody( unsigned int nBody );
  26. void SetMDLSkin( int nSkin );
  27. void InvalidateImage();
  28. private:
  29. CIconRenderReceiver *m_pCachedIcon;
  30. IMaterial *m_pCachedMaterial;
  31. int m_iCachedTextureID;
  32. };
  33. #endif // MODELIMAGEPANEL_H