diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/client/commentary_modelviewer.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/client/commentary_modelviewer.h')
| -rw-r--r-- | mp/src/game/client/commentary_modelviewer.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/mp/src/game/client/commentary_modelviewer.h b/mp/src/game/client/commentary_modelviewer.h new file mode 100644 index 00000000..9780ab3f --- /dev/null +++ b/mp/src/game/client/commentary_modelviewer.h @@ -0,0 +1,75 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef COMMENTARY_MODELVIEWER_H
+#define COMMENTARY_MODELVIEWER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Frame.h>
+#include <game/client/iviewport.h>
+#include "basemodelpanel.h"
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+class CCommentaryModelPanel : public CModelPanel
+{
+public:
+ DECLARE_CLASS_SIMPLE( CCommentaryModelPanel, CModelPanel );
+
+ CCommentaryModelPanel( vgui::Panel *parent, const char *name );
+};
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+class CCommentaryModelViewer : public vgui::Frame, public IViewPortPanel
+{
+ DECLARE_CLASS_SIMPLE( CCommentaryModelViewer, vgui::Frame );
+public:
+ CCommentaryModelViewer(IViewPort *pViewPort);
+ virtual ~CCommentaryModelViewer();
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ virtual void PerformLayout( void );
+ virtual void OnCommand( const char *command );
+ virtual void OnKeyCodePressed( vgui::KeyCode code );
+ virtual void OnThink( void );
+
+ void SetModel( const char *pszName, const char *pszAttached );
+
+ void HandleMovementInput( void );
+
+ // IViewPortPanel
+public:
+ virtual const char *GetName( void ) { return PANEL_COMMENTARY_MODELVIEWER; }
+ virtual void SetData(KeyValues *data) {};
+ virtual void Reset() {};
+ virtual void Update() {};
+ virtual bool NeedsUpdate( void ) { return false; }
+ virtual bool HasInputElements( void ) { return true; }
+ virtual void ShowPanel( bool bShow );
+
+ // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui
+ vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); }
+ virtual bool IsVisible() { return BaseClass::IsVisible(); }
+ virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); }
+
+private:
+ IViewPort *m_pViewPort;
+ CCommentaryModelPanel *m_pModelPanel;
+
+ Vector m_vecResetPos;
+ Vector m_vecResetAngles;
+ bool m_bTranslating;
+ float m_flYawSpeed;
+ float m_flZoomSpeed;
+};
+
+#endif // COMMENTARY_MODELVIEWER_H
|