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.

41 lines
973 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef TGAIMAGEPANEL_H
  7. #define TGAIMAGEPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/Panel.h"
  12. using namespace vgui;
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Displays a tga image
  15. //-----------------------------------------------------------------------------
  16. class CTGAImagePanel : public vgui::Panel
  17. {
  18. DECLARE_CLASS_SIMPLE( CTGAImagePanel, vgui::Panel );
  19. public:
  20. CTGAImagePanel( vgui::Panel *parent, const char *name );
  21. ~CTGAImagePanel();
  22. void SetTGA( const char *filename );
  23. void SetTGANonMod( const char *filename );
  24. virtual void Paint( void );
  25. private:
  26. int m_iTextureID;
  27. int m_iImageWidth, m_iImageHeight;
  28. bool m_bHasValidTexture, m_bLoadedTexture;
  29. char m_szTGAName[256];
  30. };
  31. #endif //TGAIMAGEPANEL_H