MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / UpdateAvailableWithLevels

Method UpdateAvailableWithLevels

editor/ScriptLevelInterface.cpp:486–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484void CScriptLevelInterface::OnSelchangeSelectedScript() { OnCloseupSelectedScript(); }
485
486void CScriptLevelInterface::UpdateAvailableWithLevels() {
487 CCheckListBox *list = (CCheckListBox *)GetDlgItem(IDC_LIST_AVAILABLE);
488 if (!list)
489 return;
490
491 list->ResetContent();
492
493 SetStatus("Updating available levels");
494
495 char buffer[_MAX_PATH];
496 int length;
497
498 for (int i = 0; i < MAX_GAMEFILES; i++) {
499 if (Gamefiles[i].used) {
500 // we're only adding .d3l's to this list
501 length = strlen(Gamefiles[i].name);
502 if (!stricmp(&Gamefiles[i].name[length - 4], ".d3l") &&
503 (mng_FindTrackLock(Gamefiles[i].name, PAGETYPE_GAMEFILE) == -1)) {
504 strcpy(buffer, Gamefiles[i].name);
505 buffer[length - 4] = '\0';
506 list->AddString(buffer);
507 }
508 }
509 }
510
511 SetStatus("Ready");
512}
513
514void CScriptLevelInterface::UpdateAvailableWithScripts() {
515 CCheckListBox *list = (CCheckListBox *)GetDlgItem(IDC_LIST_AVAILABLE);

Callers

nothing calls this directly

Calls 2

mng_FindTrackLockFunction · 0.85
AddStringMethod · 0.80

Tested by

no test coverage detected