aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/game_controls/NavProgress.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/client/game_controls/NavProgress.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/client/game_controls/NavProgress.h')
-rw-r--r--mp/src/game/client/game_controls/NavProgress.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/mp/src/game/client/game_controls/NavProgress.h b/mp/src/game/client/game_controls/NavProgress.h
new file mode 100644
index 00000000..a0723271
--- /dev/null
+++ b/mp/src/game/client/game_controls/NavProgress.h
@@ -0,0 +1,59 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef NAVPROGRESS_H
+#define NAVPROGRESS_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Frame.h>
+#include <vgui_controls/ProgressBar.h>
+
+#include <game/client/iviewport.h>
+
+class CNavProgress : public vgui::Frame, public IViewPortPanel
+{
+private:
+ DECLARE_CLASS_SIMPLE( CNavProgress, vgui::Frame );
+
+public:
+ CNavProgress(IViewPort *pViewPort);
+ virtual ~CNavProgress();
+
+ virtual const char *GetName( void ) { return PANEL_NAV_PROGRESS; }
+ 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 ); }
+
+public:
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ virtual void PerformLayout();
+ void Init( const char *title, int numTicks, int currentTick );
+
+protected:
+ IViewPort *m_pViewPort;
+
+ int m_numTicks;
+ int m_currentTick;
+
+ vgui::Label * m_pTitle;
+ vgui::Label * m_pText;
+ vgui::Panel * m_pProgressBarBorder;
+ vgui::Panel * m_pProgressBar;
+ vgui::Panel * m_pProgressBarSizer;
+};
+
+#endif // NAVPROGRESS_H