ultimatepp/uppdev/MySupport/MyProgress.cpp
cxl 4a1c627474 Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

25 lines
360 B
C++

#include "support.h"
void MyProgress::SetMax(int max) {
ts = max;
return;
}
void MyProgress::SetLev(int lev) {
pp = lev;
Set(pp, ts);
Refresh();
return;
}
bool MyProgress::PartialProgress(int par, int tot) {
double k = (double)ts / (double)tot;
int p = fceil(par / k);
Set(pp+p, ts);
Refresh();
return false;
}