mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
work towards reflecting the typemask in the checkboxes in a combinatory manner again
This commit is contained in:
parent
677c061bc9
commit
d8fcbb7863
2 changed files with 19 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ class BitfieldConsoleBaseType : public ConsoleBaseType
|
||||||
if (inString.find((*tbl)[i].getName()) != String::NPos)
|
if (inString.find((*tbl)[i].getName()) != String::NPos)
|
||||||
mask.set(BIT(i));
|
mask.set(BIT(i));
|
||||||
}
|
}
|
||||||
retVal = mask;
|
retVal = mask.getMask();
|
||||||
}
|
}
|
||||||
*((S32*)dptr) = retVal;
|
*((S32*)dptr) = retVal;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1522,6 +1522,24 @@ void GuiInspectorTypeBitMask32::setValue( StringTableEntry value )
|
||||||
{
|
{
|
||||||
U32 mask = dAtoui( value );
|
U32 mask = dAtoui( value );
|
||||||
|
|
||||||
|
if (mask == 0 && mask != -1) //zero we need to double check. -1 we know is all on
|
||||||
|
{
|
||||||
|
BitSet32 bitMask;
|
||||||
|
const EnumTable* tbl = mInspector->getInspectObject(0)->getClassRep()->getEnumTable();
|
||||||
|
if (tbl)
|
||||||
|
{
|
||||||
|
const U32 numEnums = tbl->getNumValues();
|
||||||
|
String inString(value);
|
||||||
|
|
||||||
|
for (U32 i = 0; i < numEnums; i++)
|
||||||
|
{
|
||||||
|
if (inString.find((*tbl)[i].getName()) != String::NPos)
|
||||||
|
bitMask.set(BIT(i));
|
||||||
|
}
|
||||||
|
mask = bitMask.getMask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for ( U32 i = 0; i < mArrayCtrl->size(); i++ )
|
for ( U32 i = 0; i < mArrayCtrl->size(); i++ )
|
||||||
{
|
{
|
||||||
GuiCheckBoxCtrl *pCheckBox = dynamic_cast<GuiCheckBoxCtrl*>( mArrayCtrl->at(i) );
|
GuiCheckBoxCtrl *pCheckBox = dynamic_cast<GuiCheckBoxCtrl*>( mArrayCtrl->at(i) );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue