MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / UpdateObjectInTree

Method UpdateObjectInTree

Editor/VegetationPanel.cpp:391–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void CVegetationPanel::UpdateObjectInTree( CVegetationObject *object,bool bUpdateInfo )
392{
393 CString str;
394 char filename[_MAX_PATH];
395
396 // Find object.
397 TV_ITEM item;
398 ZeroStruct(item);
399 item.mask = TVIF_PARAM;
400 item.lParam = (LPARAM)object;
401 HTREEITEM hItem = m_objectsTree.FindNextItem( &item,NULL );
402 if (hItem)
403 {
404 // Add new category item.
405 _splitpath( object->GetFileName(),0,0,filename,0 );
406 str.Format( "%s (%d)",filename,object->GetNumInstances() );
407 m_objectsTree.SetItemText( hItem,str );
408 }
409
410 if (bUpdateInfo)
411 UpdateInfo();
412}
413
414void CVegetationPanel::UpdateAllObjectsInTree()
415{

Callers 6

PaintBrushMethod · 0.80
PlaceThingMethod · 0.80
DistributeMethod · 0.80
DistributeMaskMethod · 0.80
ClearMethod · 0.80
RemoveSelectedObjectsMethod · 0.80

Calls 6

FindNextItemMethod · 0.80
FormatMethod · 0.80
SetItemTextMethod · 0.80
ZeroStructFunction · 0.50
GetFileNameMethod · 0.45
GetNumInstancesMethod · 0.45

Tested by

no test coverage detected