Counter Strike : Global Offensive Source Code
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.

59 lines
1.4 KiB

  1. //========= Copyright � 1996-2005, 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. #include "tier1/utlstring.h"
  13. using namespace vgui;
  14. //-----------------------------------------------------------------------------
  15. // Purpose: Displays a tga image
  16. //-----------------------------------------------------------------------------
  17. class CTGAImagePanel : public vgui::Panel
  18. {
  19. DECLARE_CLASS_SIMPLE( CTGAImagePanel, vgui::Panel );
  20. public:
  21. CTGAImagePanel( vgui::Panel *parent, const char *name );
  22. ~CTGAImagePanel();
  23. void SetTGAFilename( const char *filename );
  24. char const *GetTGAFilename() const;
  25. void SetTGAFilenameNonMod( const char *filename );
  26. void SetShouldScaleImage( bool state );
  27. void SetImageColor( Color imageColor );
  28. int GetTextureID( void ) const { return m_iTextureID; }
  29. virtual void GetSettings(KeyValues *outResourceData);
  30. virtual void ApplySettings(KeyValues *inResourceData);
  31. virtual void Paint( void );
  32. private:
  33. int m_iTextureID;
  34. int m_iImageWidth;
  35. int m_iImageHeight;
  36. Color m_ImageColor;
  37. CUtlString m_sTGAFilenameWithPath;
  38. CUtlString m_sTGAFilename;
  39. bool m_bHasValidTexture : 1;
  40. bool m_bLoadedTexture : 1;
  41. bool m_bScaleImage : 1;
  42. };
  43. #endif //TGAIMAGEPANEL_H