guiControlProfile

This commit is contained in:
marauder2k7 2024-12-26 13:11:29 +00:00
parent b75d5b70c6
commit 32c6330b72
16 changed files with 91 additions and 189 deletions

View file

@ -220,14 +220,14 @@ void GuiProgressBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
//drawing stretch bitmap
RectI progressRect = ctrlRect;
progressRect.extent.x = width;
drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRect, mProfile->mBitmapArrayRects[0]);
drawUtil->drawBitmapStretchSR(mProfile->getBitmap(), progressRect, mProfile->mBitmapArrayRects[0]);
}
}
else if(mNumberOfBitmaps >= 3)
{
//drawing left-end bitmap
RectI progressRectLeft(ctrlRect.point.x, ctrlRect.point.y, mDim, mDim);
drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRectLeft, mProfile->mBitmapArrayRects[0]);
drawUtil->drawBitmapStretchSR(mProfile->getBitmap(), progressRectLeft, mProfile->mBitmapArrayRects[0]);
//draw the progress with image
S32 width = (S32)((F32)(getWidth()) * mProgress);
@ -239,11 +239,11 @@ void GuiProgressBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
progressRect.extent.x = (width - mDim - mDim);
if (progressRect.extent.x < 0)
progressRect.extent.x = 0;
drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRect, mProfile->mBitmapArrayRects[1]);
drawUtil->drawBitmapStretchSR(mProfile->getBitmap(), progressRect, mProfile->mBitmapArrayRects[1]);
//drawing right-end bitmap
RectI progressRectRight(progressRect.point.x + progressRect.extent.x, ctrlRect.point.y, mDim, mDim );
drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRectRight, mProfile->mBitmapArrayRects[2]);
drawUtil->drawBitmapStretchSR(mProfile->getBitmap(), progressRectRight, mProfile->mBitmapArrayRects[2]);
}
}
else