mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-03 03:25:11 +00:00
guiprofiles augs
guiprofiles now have additional options: borderSEL and borderERR in keeping with the fillcolor variants. fontColors now also takes an optional ERR entry on the backend, though that remains unleveraged at time of writing. guiiconbuttonctrl now uses the expanded list in conjunction with renderFilledBorder asset browser profiles now contain a AssetBrowserProtoProfile that type-profiles derive from for consistency in border selection, highlight, (and down the line error) colors and border thickness while maintaining type-sepcific border color entries for general display
This commit is contained in:
parent
d887c27d95
commit
73e3b44e12
4 changed files with 62 additions and 89 deletions
|
|
@ -223,7 +223,16 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
bool depressed = mDepressed;
|
||||
|
||||
ColorI fontColor = mActive ? (highlight ? mProfile->mFontColorHL : mProfile->mFontColor) : mProfile->mFontColorNA;
|
||||
|
||||
ColorI borderColor = mActive ? (highlight ? mProfile->mBorderColorHL : mProfile->mBorderColor) : mProfile->mBorderColorNA;
|
||||
ColorI fillColor = mActive ? (highlight ? mProfile->mFillColorHL : mProfile->mFillColor) : mProfile->mFillColorNA;
|
||||
|
||||
if (mActive && (depressed || mStateOn))
|
||||
{
|
||||
fontColor = mProfile->mFontColorSEL;
|
||||
fillColor = mProfile->mFillColorSEL;
|
||||
borderColor = mProfile->mBorderColorSEL;
|
||||
}
|
||||
|
||||
RectI boundsRect(offset, getExtent());
|
||||
|
||||
GFXDrawUtil *drawer = GFX->getDrawUtil();
|
||||
|
|
@ -235,7 +244,12 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
if(mProfile->mUseBitmapArray && !mProfile->mBitmapArrayRects.empty())
|
||||
renderBitmapArray(boundsRect, statePressed);
|
||||
else
|
||||
renderSlightlyLoweredBox(boundsRect, mProfile);
|
||||
{
|
||||
if (mProfile->mBorder != 0)
|
||||
renderFilledBorder(boundsRect, borderColor, fillColor, mProfile->mBorderThickness);
|
||||
else
|
||||
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
|
||||
}
|
||||
}
|
||||
else if(mHighlighted && mActive)
|
||||
{
|
||||
|
|
@ -248,9 +262,9 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
else
|
||||
{
|
||||
if (mProfile->mBorder != 0)
|
||||
renderFilledBorder(boundsRect, mProfile->mBorderColorHL, mProfile->mFillColorHL, mProfile->mBorderThickness);
|
||||
renderFilledBorder(boundsRect, borderColor, fillColor, mProfile->mBorderThickness);
|
||||
else
|
||||
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColorHL);
|
||||
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -266,20 +280,10 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mActive)
|
||||
{
|
||||
if (mProfile->mBorder != 0)
|
||||
renderFilledBorder(boundsRect, mProfile->mBorderColor, mProfile->mFillColor, mProfile->mBorderThickness);
|
||||
else
|
||||
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
|
||||
}
|
||||
if (mProfile->mBorder != 0)
|
||||
renderFilledBorder(boundsRect, borderColor, fillColor, mProfile->mBorderThickness);
|
||||
else
|
||||
{
|
||||
if (mProfile->mBorder != 0)
|
||||
renderFilledBorder(boundsRect, mProfile->mBorderColorNA, mProfile->mFillColorNA, mProfile->mBorderThickness);
|
||||
else
|
||||
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
|
||||
}
|
||||
GFX->getDrawUtil()->drawRectFill(boundsRect, mProfile->mFillColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue