summaryrefslogtreecommitdiff
path: root/public/vgui_controls/RotatingProgressBar.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/vgui_controls/RotatingProgressBar.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/vgui_controls/RotatingProgressBar.h')
-rw-r--r--public/vgui_controls/RotatingProgressBar.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/public/vgui_controls/RotatingProgressBar.h b/public/vgui_controls/RotatingProgressBar.h
new file mode 100644
index 0000000..400838c
--- /dev/null
+++ b/public/vgui_controls/RotatingProgressBar.h
@@ -0,0 +1,67 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef ROTATINGPROGRESSBAR_H
+#define ROTATINGPROGRESSBAR_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui/VGUI.h>
+#include <vgui_controls/Panel.h>
+#include <vgui_controls/ProgressBar.h>
+
+namespace vgui
+{
+
+ //-----------------------------------------------------------------------------
+ // Purpose: Progress Bar that rotates an image around its center
+ //-----------------------------------------------------------------------------
+ class RotatingProgressBar : public ProgressBar
+ {
+ DECLARE_CLASS_SIMPLE( RotatingProgressBar, ProgressBar );
+
+ public:
+ RotatingProgressBar(Panel *parent, const char *panelName);
+ ~RotatingProgressBar();
+
+ virtual void ApplySettings(KeyValues *inResourceData);
+ virtual void ApplySchemeSettings(IScheme *pScheme);
+
+ void SetImage( const char *imageName );
+
+ protected:
+ virtual void Paint();
+ virtual void PaintBackground();
+ virtual void OnTick();
+
+ private:
+ int m_nTextureId;
+ char *m_pszImageName;
+
+ float m_flStartRadians;
+ float m_flEndRadians;
+
+ float m_flLastAngle;
+
+ float m_flTickDelay;
+ float m_flApproachSpeed;
+
+ float m_flRotOriginX;
+ float m_flRotOriginY;
+
+ float m_flRotatingX;
+ float m_flRotatingY;
+ float m_flRotatingWide;
+ float m_flRotatingTall;
+
+ };
+
+} // namespace vgui
+
+#endif // ROTATINGPROGRESSBAR_H \ No newline at end of file