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

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TF_IMAGEPANEL_H
  8. #define TF_IMAGEPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "tf_shareddefs.h"
  13. #include <vgui/IScheme.h>
  14. #include <vgui_controls/ScalableImagePanel.h>
  15. #include "GameEventListener.h"
  16. #define MAX_BG_LENGTH 128
  17. class CTFImagePanel : public vgui::ScalableImagePanel, public CGameEventListener
  18. {
  19. public:
  20. DECLARE_CLASS_SIMPLE( CTFImagePanel, vgui::ScalableImagePanel );
  21. CTFImagePanel( vgui::Panel *parent, const char *name );
  22. virtual void ApplySettings( KeyValues *inResourceData );
  23. void UpdateBGImage( void );
  24. void SetBGTeam( int iTeam ) { m_iBGTeam = iTeam; }
  25. public: // IGameEventListener Interface
  26. virtual void FireGameEvent( IGameEvent * event );
  27. public:
  28. char m_szTeamBG[TF_TEAM_COUNT][MAX_BG_LENGTH];
  29. int m_iBGTeam;
  30. };
  31. #endif // TF_IMAGEPANEL_H