//----------------------------------------------------------------------------- // Purpose: creates the full path for a node //----------------------------------------------------------------------------- void DirectorySelectDialog::GenerateFullPathForNode(int nodeIndex, char *path, int pathBufferSize) { // get all the nodes CUtlLinkedList<int, int> nodes; nodes.AddToTail(nodeIndex); int parentIndex = nodeIndex; while (1) { parentIndex = m_pDirTree->GetItemParent(parentIndex); if (parentIndex == -1) break; nodes.AddToHead(parentIndex); } // walk the nodes, adding to the path path[0] = 0; bool bFirst = true; FOR_EACH_LL( nodes, i ) { KeyValues *kv = m_pDirTree->GetItemData( nodes[i] ); strcat(path, kv->GetString("Text")); if (!bFirst) { strcat(path, "\\"); } bFirst = false; }
CGroundLine::CGroundLine() : BaseClass( NULL, "CGroundLine" ) { m_pMaterial = NULL; m_ListHandle = s_GroundLines.AddToHead( this ); SetParent( CMinimapPanel::MinimapRootPanel() ); m_nPoints = 0; SetVisible( true ); SetPaintBackgroundEnabled( false ); }