mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
guiControlProfile
This commit is contained in:
parent
b75d5b70c6
commit
32c6330b72
16 changed files with 91 additions and 189 deletions
|
|
@ -132,7 +132,7 @@ bool GuiBitmapBorderCtrl::onWake()
|
|||
|
||||
//get the texture for the close, minimize, and maximize buttons
|
||||
mBitmapBounds = NULL;
|
||||
mTextureObject = mProfile->getBitmapResource();
|
||||
mTextureObject = mProfile->getBitmap();
|
||||
if( mProfile->constructBitmapArray() >= NumBitmaps )
|
||||
mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void GuiGameListMenuCtrl::onRenderListOption(Row* row, Point2I currentOffset)
|
|||
arrowOffset.y = currentOffset.y + arrowOffsetY;
|
||||
|
||||
drawer->clearBitmapModulation();
|
||||
drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
drawer->drawBitmapStretchSR(profile->getBitmap(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
|
||||
// render the right arrow
|
||||
bool arrowOnR = (isRowSelected || isRowHighlighted) && (row->mWrapOptions || (row->mSelectedOption < row->mOptions.size() - 1));
|
||||
|
|
@ -214,7 +214,7 @@ void GuiGameListMenuCtrl::onRenderListOption(Row* row, Point2I currentOffset)
|
|||
arrowOffset.y = currentOffset.y + arrowOffsetY;
|
||||
|
||||
drawer->clearBitmapModulation();
|
||||
drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
drawer->drawBitmapStretchSR(profile->getBitmap(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
}
|
||||
|
||||
// get the appropriate font color
|
||||
|
|
@ -1758,7 +1758,7 @@ bool GuiGameListMenuProfile::onAdd()
|
|||
|
||||
// We can't call enforceConstraints() here because incRefCount initializes
|
||||
// some of the things to enforce. Do a basic sanity check here instead.
|
||||
U32 assetStatus = ImageAsset::getAssetErrCode(mBitmapAsset);
|
||||
U32 assetStatus = ImageAsset::getAssetErrCode(getBitmapAsset());
|
||||
if (assetStatus != AssetBase::Ok && assetStatus != AssetBase::UsingFallback)
|
||||
{
|
||||
Con::errorf( "GuiGameListMenuProfile: %s can't be created without a bitmap. Please add a 'Bitmap' property to the object definition.", getName() );
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ void GuiGameListOptionsCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
arrowOffset.y = currentOffset.y + arrowOffsetY;
|
||||
|
||||
drawer->clearBitmapModulation();
|
||||
drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
drawer->drawBitmapStretchSR(profile->getBitmap(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
|
||||
// render the right arrow
|
||||
bool arrowOnR = (isRowSelected || isRowHighlighted) && (myRow->mWrapOptions || (myRow->mSelectedOption < myRow->mOptions.size() - 1));
|
||||
|
|
@ -120,7 +120,7 @@ void GuiGameListOptionsCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
arrowOffset.y = currentOffset.y + arrowOffsetY;
|
||||
|
||||
drawer->clearBitmapModulation();
|
||||
drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
drawer->drawBitmapStretchSR(profile->getBitmap(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
}
|
||||
|
||||
// get the appropriate font color
|
||||
|
|
|
|||
|
|
@ -432,9 +432,9 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
drawUtil->clearBitmapModulation();
|
||||
|
||||
//left border
|
||||
drawUtil->drawBitmapSR(mProfile->getBitmapResource(), Point2I(offset.x,offset.y), mBitmapBounds[SliderLineLeft]);
|
||||
drawUtil->drawBitmapSR(mProfile->getBitmap(), Point2I(offset.x,offset.y), mBitmapBounds[SliderLineLeft]);
|
||||
//right border
|
||||
drawUtil->drawBitmapSR(mProfile->getBitmapResource(), Point2I(offset.x + getWidth() - mBitmapBounds[SliderLineRight].extent.x, offset.y), mBitmapBounds[SliderLineRight]);
|
||||
drawUtil->drawBitmapSR(mProfile->getBitmap(), Point2I(offset.x + getWidth() - mBitmapBounds[SliderLineRight].extent.x, offset.y), mBitmapBounds[SliderLineRight]);
|
||||
|
||||
|
||||
//draw our center piece to our slider control's border and stretch it
|
||||
|
|
@ -448,11 +448,11 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
stretchRect = mBitmapBounds[SliderLineCenter];
|
||||
stretchRect.inset(1,0);
|
||||
|
||||
drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), destRect, stretchRect);
|
||||
drawUtil->drawBitmapStretchSR(mProfile->getBitmap(), destRect, stretchRect);
|
||||
|
||||
//draw our control slider button
|
||||
thumb.point += pos;
|
||||
drawUtil->drawBitmapSR(mProfile->getBitmapResource(),Point2I(thumb.point.x,offset.y ),mBitmapBounds[index]);
|
||||
drawUtil->drawBitmapSR(mProfile->getBitmap(),Point2I(thumb.point.x,offset.y ),mBitmapBounds[index]);
|
||||
|
||||
}
|
||||
else if (getWidth() >= getHeight())
|
||||
|
|
|
|||
|
|
@ -3781,7 +3781,7 @@ void GuiTreeViewCtrl::onRenderCell(Point2I offset, Point2I cell, bool, bool )
|
|||
if( ( bitmap >= 0 ) && ( bitmap < mProfile->mBitmapArrayRects.size() ) )
|
||||
{
|
||||
if( drawBitmap )
|
||||
drawer->drawBitmapSR( mProfile->getBitmapResource(), drawRect.point, mProfile->mBitmapArrayRects[bitmap] );
|
||||
drawer->drawBitmapSR( mProfile->getBitmap(), drawRect.point, mProfile->mBitmapArrayRects[bitmap] );
|
||||
newOffset = mProfile->mBitmapArrayRects[bitmap].extent.x;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue