| 1305 | ); |
| 1306 | |
| 1307 | bool GuiInspectorTypeBitMask32::onAdd() |
| 1308 | { |
| 1309 | // Skip our parent because we aren't using mEditCtrl |
| 1310 | // and according to our parent that would be cause to fail onAdd. |
| 1311 | if ( !Parent::Parent::onAdd() ) |
| 1312 | return false; |
| 1313 | |
| 1314 | if ( !mInspector ) |
| 1315 | return false; |
| 1316 | |
| 1317 | const EnumTable* table = mField->table; |
| 1318 | if( !table ) |
| 1319 | { |
| 1320 | ConsoleBaseType* type = ConsoleBaseType::getType( mField->type ); |
| 1321 | if( type && type->getEnumTable() ) |
| 1322 | table = type->getEnumTable(); |
| 1323 | else |
| 1324 | return false; |
| 1325 | } |
| 1326 | |
| 1327 | static StringTableEntry sProfile = StringTable->insert( "profile" ); |
| 1328 | setDataField( sProfile, NULL, "GuiInspectorFieldProfile" ); |
| 1329 | setBounds(0,0,100,18); |
| 1330 | |
| 1331 | // Allocate our children controls... |
| 1332 | |
| 1333 | mRollout = new GuiRolloutCtrl(); |
| 1334 | mRollout->setMargin( 14, 0, 0, 0 ); |
| 1335 | mRollout->setCanCollapse( false ); |
| 1336 | mRollout->registerObject(); |
| 1337 | addObject( mRollout ); |
| 1338 | |
| 1339 | mArrayCtrl = new GuiDynamicCtrlArrayControl(); |
| 1340 | mArrayCtrl->setDataField( sProfile, NULL, "GuiInspectorBitMaskArrayProfile" ); |
| 1341 | mArrayCtrl->setField( "autoCellSize", "true" ); |
| 1342 | mArrayCtrl->setField( "fillRowFirst", "true" ); |
| 1343 | mArrayCtrl->setField( "dynamicSize", "true" ); |
| 1344 | mArrayCtrl->setField( "rowSpacing", "4" ); |
| 1345 | mArrayCtrl->setField( "colSpacing", "1" ); |
| 1346 | mArrayCtrl->setField( "frozen", "true" ); |
| 1347 | mArrayCtrl->registerObject(); |
| 1348 | |
| 1349 | mRollout->addObject( mArrayCtrl ); |
| 1350 | |
| 1351 | GuiCheckBoxCtrl *pCheckBox = NULL; |
| 1352 | |
| 1353 | const EngineEnumTable& t = *table; |
| 1354 | const U32 numValues = t.getNumValues(); |
| 1355 | |
| 1356 | for ( S32 i = 0; i < numValues; i++ ) |
| 1357 | { |
| 1358 | pCheckBox = new GuiCheckBoxCtrl(); |
| 1359 | pCheckBox->setText( t[ i ].getName() ); |
| 1360 | pCheckBox->registerObject(); |
| 1361 | mArrayCtrl->addObject( pCheckBox ); |
| 1362 | |
| 1363 | pCheckBox->autoSize(); |
| 1364 |
nothing calls this directly
no test coverage detected