mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Selection Highlighting
This commit is contained in:
parent
64d1b06866
commit
d4c2eeea98
7 changed files with 52 additions and 0 deletions
|
|
@ -375,6 +375,8 @@ bool TSStatic::_createShape()
|
|||
|
||||
mShapeInstance = new TSShapeInstance( mShape, isClientObject() );
|
||||
|
||||
if (isClientObject())
|
||||
mShapeInstance->cloneMaterialList();
|
||||
if( isGhost() )
|
||||
{
|
||||
// Reapply the current skin
|
||||
|
|
@ -1405,3 +1407,22 @@ void TSStatic::onStaticModified(const char* slotName, const char*newValue)
|
|||
|
||||
set_special_typing();
|
||||
}
|
||||
|
||||
void TSStatic::setSelectionFlags(U8 flags)
|
||||
{
|
||||
Parent::setSelectionFlags(flags);
|
||||
|
||||
if (!mShapeInstance || !isClientObject())
|
||||
return;
|
||||
|
||||
if (!mShapeInstance->ownMaterialList())
|
||||
return;
|
||||
|
||||
TSMaterialList* pMatList = mShapeInstance->getMaterialList();
|
||||
for (S32 j = 0; j < pMatList->size(); j++)
|
||||
{
|
||||
BaseMatInstance * bmi = pMatList->getMaterialInst(j);
|
||||
bmi->setSelectionHighlighting(needsSelectionHighlighting());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue