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.

50 lines
1.1 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef SUBRECTIMAGE_H
  7. #define SUBRECTIMAGE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/Image.h"
  12. #include "vgui/vgui.h"
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Check box image
  15. //-----------------------------------------------------------------------------
  16. class CSubRectImage : public vgui::Image
  17. {
  18. public:
  19. CSubRectImage( const char *filename, bool hardwareFiltered, int subx, int suby, int subw, int subh );
  20. virtual ~CSubRectImage();
  21. void GetSize( int &wide, int &tall );
  22. void GetContentSize( int &wide, int &tall );
  23. void SetSize( int x, int y );
  24. void SetPos( int x, int y );
  25. void SetColor( Color col );
  26. const char *GetName();
  27. void Paint();
  28. void ForceUpload();
  29. vgui::HTexture GetID();
  30. bool IsValid();
  31. private:
  32. vgui::HTexture _id;
  33. int sub[ 4 ];
  34. char *_filename;
  35. int _pos[2];
  36. int _wide,_tall;
  37. Color _color;
  38. bool _uploaded;
  39. bool _valid;
  40. bool _filtered;
  41. };
  42. #endif // SUBRECTIMAGE_H