mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-16 09:55:24 +00:00
guiControlProfile
This commit is contained in:
parent
b75d5b70c6
commit
32c6330b72
16 changed files with 91 additions and 189 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue