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.

93 lines
2.8 KiB

  1. //========= Copyright � 1996-2006, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef COMMENTARY_MODELVIEWER_H
  8. #define COMMENTARY_MODELVIEWER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. #include <game/client/iviewport.h>
  14. // FIXME!!!!!!
  15. //#include "basemodelpanel.h"
  16. //-----------------------------------------------------------------------------
  17. // Purpose:
  18. //-----------------------------------------------------------------------------
  19. /*
  20. // FIXME!!!!!!
  21. // FIXME!!!!!!
  22. // FIXME!!!!!!
  23. This should be using the NEW model panels... "CBaseModelPanel" in basemodel_panel.h/.cpp
  24. Need to comment this out so we can remove the dependence on the old CModelPanel from all but TF.
  25. This will make it so people don't accidently use it or get confused by its similar structure when
  26. working with the new class.
  27. class CCommentaryModelPanel : public CModelPanel
  28. {
  29. public:
  30. DECLARE_CLASS_SIMPLE( CCommentaryModelPanel, CModelPanel );
  31. CCommentaryModelPanel( vgui::Panel *parent, const char *name );
  32. };
  33. */
  34. //-----------------------------------------------------------------------------
  35. // Purpose:
  36. //-----------------------------------------------------------------------------
  37. class CCommentaryModelViewer : public vgui::Frame, public IViewPortPanel
  38. {
  39. DECLARE_CLASS_SIMPLE( CCommentaryModelViewer, vgui::Frame );
  40. public:
  41. explicit CCommentaryModelViewer(IViewPort *pViewPort);
  42. virtual ~CCommentaryModelViewer();
  43. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  44. virtual void PerformLayout( void );
  45. virtual void OnCommand( const char *command );
  46. virtual void OnKeyCodePressed( vgui::KeyCode code );
  47. virtual void OnThink( void );
  48. void SetModel( const char *pszName, const char *pszAttached );
  49. void HandleMovementInput( void );
  50. // IViewPortPanel
  51. public:
  52. virtual const char *GetName( void ) { return PANEL_COMMENTARY_MODELVIEWER; }
  53. virtual void SetData(KeyValues *data) {};
  54. virtual void Reset() {};
  55. virtual void Update() {};
  56. virtual bool NeedsUpdate( void ) { return false; }
  57. virtual bool HasInputElements( void ) { return true; }
  58. virtual void ShowPanel( bool bShow );
  59. // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui
  60. vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); }
  61. virtual bool IsVisible() { return BaseClass::IsVisible(); }
  62. virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); }
  63. virtual bool WantsBackgroundBlurred( void ) { return false; }
  64. private:
  65. IViewPort *m_pViewPort;
  66. // FIXME!!!!!!
  67. //CCommentaryModelPanel *m_pModelPanel;
  68. Vector m_vecResetPos;
  69. Vector m_vecResetAngles;
  70. bool m_bTranslating;
  71. float m_flYawSpeed;
  72. float m_flZoomSpeed;
  73. };
  74. #endif // COMMENTARY_MODELVIEWER_H