Correct progress bar position
This commit is contained in:
parent
8062319160
commit
45fecfe72c
@ -13,6 +13,8 @@
|
|||||||
void Task::AddTaskListener(TaskListener * listener)
|
void Task::AddTaskListener(TaskListener * listener)
|
||||||
{
|
{
|
||||||
this->listener = listener;
|
this->listener = listener;
|
||||||
|
notifyProgressMain();
|
||||||
|
notifyStatusMain();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Task::Start()
|
void Task::Start()
|
||||||
|
@ -99,8 +99,11 @@ void TaskWindow::OnDraw()
|
|||||||
|
|
||||||
if(progress!=-1)
|
if(progress!=-1)
|
||||||
{
|
{
|
||||||
float size = float(Size.X-4)*(float(progress)/100.0f); // TIL...
|
if(progress > 0)
|
||||||
g->fillrect(Position.X + 2, Position.Y + Size.Y-15, size, 13, progressBarColour.Red, progressBarColour.Green, progressBarColour.Blue, 255);
|
{
|
||||||
|
float size = float(Size.X-4)*(float(progress)/100.0f); // TIL...
|
||||||
|
g->fillrect(Position.X + 2, Position.Y + Size.Y-15, size, 13, progressBarColour.Red, progressBarColour.Green, progressBarColour.Blue, 255);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
int size = 40, rsize = 0;
|
int size = 40, rsize = 0;
|
||||||
float position = float(Size.X-4)*(intermediatePos/100.0f);
|
float position = float(Size.X-4)*(intermediatePos/100.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user