Correct progress bar position

This commit is contained in:
Simon Robertshaw 2012-07-25 12:53:39 +01:00
parent 8062319160
commit 45fecfe72c
2 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,8 @@
void Task::AddTaskListener(TaskListener * listener)
{
this->listener = listener;
notifyProgressMain();
notifyStatusMain();
}
void Task::Start()

View File

@ -98,9 +98,12 @@ void TaskWindow::OnDraw()
ui::Colour progressBarColour = style::Colour::WarningTitle;
if(progress!=-1)
{
if(progress > 0)
{
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 {
int size = 40, rsize = 0;
float position = float(Size.X-4)*(intermediatePos/100.0f);