MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getItemValue

Method getItemValue

Engine/source/gui/controls/guiTreeViewCtrl.cpp:2515–2534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2513//-----------------------------------------------------------------------------
2514
2515const char * GuiTreeViewCtrl::getItemValue(S32 itemId)
2516{
2517 Item * item = getItem(itemId);
2518 if(!item)
2519 {
2520 Con::errorf(ConsoleLogEntry::General, "GuiTreeViewCtrl::getItemValue: invalid item id!");
2521 return("");
2522 }
2523
2524 if(item->mState.test(Item::InspectorData))
2525 {
2526 // If it's InspectorData, we let people use this call to get an object reference.
2527 return item->mInspectorInfo.mObject->getIdString();
2528 }
2529 else
2530 {
2531 // Just return the script value...
2532 return item->getValue();
2533 }
2534}
2535
2536//-----------------------------------------------------------------------------
2537

Callers 2

Calls 4

getIdStringMethod · 0.80
errorfFunction · 0.50
testMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected