mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
* Fixes description for a few Scene methods
* Adds method to Scene to delete dynamic objects in the scene * Add getNodeTransform to ShapeBase * Add sanity check to AFX ea_update function to avoid divide by zero * Adds ability to set color mul on GuiBitmapBorderCtrl like bitmapCtrl * MatrixF utilty functions/operators * Add ability to ignore an object in the containerBoxEmpty method call * Adds some better initialization/sanity handling for resetWorldBox and resetRenderWorldBox for SceneObject
This commit is contained in:
parent
e630ab859a
commit
da06fc1d96
10 changed files with 98 additions and 15 deletions
|
|
@ -48,7 +48,13 @@ class GuiBitmapBorderCtrl : public GuiControl
|
|||
};
|
||||
RectI *mBitmapBounds; ///< bmp is [3*n], bmpHL is [3*n + 1], bmpNA is [3*n + 2]
|
||||
GFXTexHandle mTextureObject;
|
||||
ColorI mColor;
|
||||
|
||||
public:
|
||||
GuiBitmapBorderCtrl();
|
||||
|
||||
static void initPersistFields();
|
||||
|
||||
bool onWake();
|
||||
void onSleep();
|
||||
void onRender(Point2I offset, const RectI &updateRect);
|
||||
|
|
@ -104,6 +110,21 @@ ConsoleDocClass( GuiBitmapBorderCtrl,
|
|||
"@ingroup GuiImages"
|
||||
);
|
||||
|
||||
GuiBitmapBorderCtrl::GuiBitmapBorderCtrl()
|
||||
{
|
||||
mColor.set(255,255,255, 255);
|
||||
}
|
||||
|
||||
void GuiBitmapBorderCtrl::initPersistFields()
|
||||
{
|
||||
docsURL;
|
||||
addGroup("Bitmap");
|
||||
addField("color", TypeColorI, Offset(mColor, GuiBitmapBorderCtrl), "color mul");
|
||||
endGroup("Bitmap");
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
bool GuiBitmapBorderCtrl::onWake()
|
||||
{
|
||||
if (! Parent::onWake())
|
||||
|
|
@ -153,6 +174,8 @@ void GuiBitmapBorderCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
drawUtil->drawRectFill(winRect, mProfile->mFillColor);
|
||||
|
||||
drawUtil->clearBitmapModulation();
|
||||
drawUtil->setBitmapModulation(mColor);
|
||||
|
||||
drawUtil->drawBitmapSR(mTextureObject, offset, mBitmapBounds[BorderTopLeft]);
|
||||
drawUtil->drawBitmapSR(mTextureObject, Point2I(offset.x + getWidth() - mBitmapBounds[BorderTopRight].extent.x, offset.y),
|
||||
mBitmapBounds[BorderTopRight]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue