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.

60 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TF_HUD_TRAINING_H
  8. #define TF_HUD_TRAINING_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/EditablePanel.h>
  13. #include <vgui_controls/ImagePanel.h>
  14. #include "tf_controls.h"
  15. #include "GameEventListener.h"
  16. #include "c_tf_objective_resource.h"
  17. #include "IconPanel.h"
  18. #include "tf_gamerules.h"
  19. #include "proxyentity.h"
  20. #include "materialsystem/imaterial.h"
  21. #include "materialsystem/imaterialvar.h"
  22. #define MAX_TRAINING_MSG_LENGTH 512
  23. extern int Training_GetCompletedTrainingClasses();
  24. extern void Training_MarkClassComplete( int iClass, int iStage );
  25. //-----------------------------------------------------------------------------
  26. // Purpose:
  27. //-----------------------------------------------------------------------------
  28. class CTFHudTraining : public vgui::EditablePanel, public CGameEventListener
  29. {
  30. DECLARE_CLASS_SIMPLE( CTFHudTraining, vgui::EditablePanel );
  31. public:
  32. CTFHudTraining( vgui::Panel *parent, const char *name );
  33. virtual ~CTFHudTraining();
  34. static bool FormatTrainingText( const char* input, wchar_t* output );
  35. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  36. virtual void Reset();
  37. virtual void FireGameEvent( IGameEvent *event );
  38. virtual bool IsVisible( void );
  39. virtual void OnTick();
  40. void SetTrainingText( char *msg );
  41. void SetTrainingObjective( char *msg );
  42. private:
  43. CExRichText *m_pMsgLabel;
  44. CExLabel *m_pPressSpacebarToContinueLabel;
  45. };
  46. #endif // TF_HUD_TRAINING_H