work towards reflecting the typemask in the checkboxes in a combinatory manner again

This commit is contained in:
AzaezelX 2025-03-06 23:37:37 -06:00
parent 677c061bc9
commit d8fcbb7863
2 changed files with 19 additions and 1 deletions

View file

@ -267,7 +267,7 @@ class BitfieldConsoleBaseType : public ConsoleBaseType
if (inString.find((*tbl)[i].getName()) != String::NPos)
mask.set(BIT(i));
}
retVal = mask;
retVal = mask.getMask();
}
*((S32*)dptr) = retVal;
}

View file

@ -1522,6 +1522,24 @@ void GuiInspectorTypeBitMask32::setValue( StringTableEntry 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++ )
{
GuiCheckBoxCtrl *pCheckBox = dynamic_cast<GuiCheckBoxCtrl*>( mArrayCtrl->at(i) );