MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / AddScriptsToTree

Method AddScriptsToTree

neo/tools/decl/DialogDeclBrowser.cpp:160–180  ·  view source on GitHub ↗

================ DialogDeclBrowser::AddScriptsToTree ================ */

Source from the content-addressed store, hash-verified

158================
159*/
160void DialogDeclBrowser::AddScriptsToTree( CPathTreeCtrl &tree ) {
161 int i;
162 idPathTreeStack stack;
163 idStr scriptName;
164 idFileList *files;
165
166 files = fileSystem->ListFilesTree( "script", ".script", true );
167
168 stack.PushRoot( NULL );
169
170 for ( i = 0; i < files->GetNumFiles(); i++) {
171 scriptName = files->GetFile( i );
172
173 scriptName.BackSlashesToSlashes();
174 scriptName.StripFileExtension();
175
176 tree.AddPathToTree( scriptName, GetIdFromTypeAndIndex( DECLTYPE_SCRIPT, i ), stack );
177 }
178
179 fileSystem->FreeFileList( files );
180}
181
182/*
183================

Callers

nothing calls this directly

Calls 6

ListFilesTreeMethod · 0.80
PushRootMethod · 0.80
GetNumFilesMethod · 0.80
GetFileMethod · 0.80
AddPathToTreeMethod · 0.80
FreeFileListMethod · 0.80

Tested by

no test coverage detected