Fetch the repository succeeded.
//========= Copyright ?1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef CIRCULARPROGRESSBAR_H
#define CIRCULARPROGRESSBAR_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui/VGUI2.h>
#include "Panel.h"
#include "ProgressBar.h"
enum progress_textures_t
{
PROGRESS_TEXTURE_FG,
PROGRESS_TEXTURE_BG,
NUM_PROGRESS_TEXTURES,
};
namespace vgui2
{
//-----------------------------------------------------------------------------
// Purpose: Progress Bar in the shape of a pie graph
//-----------------------------------------------------------------------------
class CircularProgressBar : public ProgressBar
{
DECLARE_CLASS_SIMPLE( CircularProgressBar, ProgressBar );
public:
CircularProgressBar(Panel *parent, const char *panelName);
~CircularProgressBar();
virtual void ApplySettings(KeyValues *inResourceData);
virtual void ApplySchemeSettings(IScheme *pScheme);
void SetFgImage(const char *imageName) { SetImage( imageName, PROGRESS_TEXTURE_FG ); }
void SetBgImage(const char *imageName) { SetImage( imageName, PROGRESS_TEXTURE_BG ); }
int GetProgressDirection() const { return m_iProgressDirection; }
void SetProgressDirection( int val ) { m_iProgressDirection = val; }
protected:
virtual void Paint();
virtual void PaintBackground();
void DrawCircleSegment( Color c, float flEndDegrees, bool clockwise /* = true */ );
void SetImage(const char *imageName, progress_textures_t iPos);
private:
enum CircularProgressDir_e
{
PROGRESS_CW,
PROGRESS_CCW
};
int m_iProgressDirection;
int m_nTextureId[NUM_PROGRESS_TEXTURES];
char *m_pszImageName[NUM_PROGRESS_TEXTURES];
int m_lenImageName[NUM_PROGRESS_TEXTURES];
};
} // namespace vgui
#endif // CIRCULARPROGRESSBAR_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。