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.

67 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ROTATINGPROGRESSBAR_H
  8. #define ROTATINGPROGRESSBAR_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui/vgui.h>
  13. #include <vgui_controls/Panel.h>
  14. #include <vgui_controls/ProgressBar.h>
  15. namespace vgui
  16. {
  17. //-----------------------------------------------------------------------------
  18. // Purpose: Progress Bar that rotates an image around its center
  19. //-----------------------------------------------------------------------------
  20. class RotatingProgressBar : public ProgressBar
  21. {
  22. DECLARE_CLASS_SIMPLE( RotatingProgressBar, ProgressBar );
  23. public:
  24. RotatingProgressBar(Panel *parent, const char *panelName);
  25. ~RotatingProgressBar();
  26. virtual void ApplySettings(KeyValues *inResourceData);
  27. virtual void ApplySchemeSettings(IScheme *pScheme);
  28. void SetImage( const char *imageName );
  29. protected:
  30. virtual void Paint();
  31. virtual void PaintBackground();
  32. virtual void OnTick();
  33. private:
  34. int m_nTextureId;
  35. char *m_pszImageName;
  36. float m_flStartRadians;
  37. float m_flEndRadians;
  38. float m_flLastAngle;
  39. float m_flTickDelay;
  40. float m_flApproachSpeed;
  41. float m_flRotOriginX;
  42. float m_flRotOriginY;
  43. float m_flRotatingX;
  44. float m_flRotatingY;
  45. float m_flRotatingWide;
  46. float m_flRotatingTall;
  47. };
  48. } // namespace vgui
  49. #endif // ROTATINGPROGRESSBAR_H