MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getItemValue

Method getItemValue

engine/source/gui/guiTreeViewCtrl.cc:1737–1756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1735}
1736
1737const char * GuiTreeViewCtrl::getItemValue(S32 itemId)
1738{
1739 Item * item = getItem(itemId);
1740 if(!item)
1741 {
1742 Con::errorf(ConsoleLogEntry::General, "GuiTreeViewCtrl::getItemValue: invalid item id!");
1743 return("");
1744 }
1745
1746 if(item->mState.test(Item::InspectorData))
1747 {
1748 // If it's InspectorData, we let people use this call to get an object reference.
1749 return item->mInspectorInfo.mObject->getIdString();
1750 }
1751 else
1752 {
1753 // Just return the script value...
1754 return(item->getValue() ? item->getValue() : "");
1755 }
1756}
1757
1758bool GuiTreeViewCtrl::editItem( S32 itemId, const char* newText, const char* newValue )
1759{

Callers 1

guiTreeViewCtrl.ccFile · 0.80

Calls 4

errorfFunction · 0.85
getIdStringMethod · 0.80
testMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected