| 1735 | } |
| 1736 | |
| 1737 | const 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 | |
| 1758 | bool GuiTreeViewCtrl::editItem( S32 itemId, const char* newText, const char* newValue ) |
| 1759 | { |
no test coverage detected