www.pudn.com > GameEngine_src.rar > CProgressBar.h
// CProgressBar.h: interface for the CProgressBar class.
//
//////////////////////////////////////////////////////////////////////
#ifndef CProgressBar_h
#define CProgressBar_h
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CEasyDraw.h"
///////////////////////////////////////////////////////////////////////
//进度条类,血条,载入条都是进度条
///////////////////////////////////////////////////////////////////////
class CProgressBar
{
public:
CProgressBar();
~CProgressBar();
bool Init( PSURFACE BackSurf, PSURFACE FrontSurf, int x, int y );
void Free();
void Draw( int x, int y, int cur_value, int max_value );
int GetBackSurfWidth() { return m_BackSurface->GetWidth(); }
int GetBackSurfHeight() { return m_BackSurface->GetHeight(); }
private:
PSURFACE m_BackSurface; //背景页面
PSURFACE m_FrontSurface; //前景页面
POINT m_FrontOffset; //前景页面相对于绘制坐标的偏移
};
#endif