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
924 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ICONPANEL_H
  8. #define ICONPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Panel.h>
  13. using namespace vgui;
  14. class CIconPanel : public vgui::Panel
  15. {
  16. DECLARE_CLASS_SIMPLE( CIconPanel, vgui::Panel );
  17. public:
  18. CIconPanel( vgui::Panel *parent, const char *name );
  19. void Init( void );
  20. virtual void Paint();
  21. virtual void ApplySettings( KeyValues *inResourceData );
  22. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  23. void SetIcon( const char *szIcon );
  24. void SetIconColor( Color cColor ) { m_IconColor = cColor; }
  25. private:
  26. CHudTexture *m_icon;
  27. char m_szIcon[128];
  28. bool m_bScaleImage;
  29. CPanelAnimationVar( Color, m_IconColor, "iconColor", "255 255 255 255" );
  30. };
  31. #endif //ICONPANEL_H