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

Method OnCloseupSelectedScript

editor/ScriptLevelInterface.cpp:455–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455void CScriptLevelInterface::OnCloseupSelectedScript() {
456 UpdateData(true);
457
458 SetStatus("Determining script type...");
459
460 char buffer[_MAX_PATH];
461 int currsel = m_ScriptToCompile.GetCurSel();
462 if (currsel >= 0) {
463 m_ScriptToCompile.GetLBText(currsel, buffer);
464
465 strcpy(LastScriptSelected, buffer);
466
467 uint8_t type = DetermineScriptType(buffer);
468
469 switch (type) {
470 case ST_GAME:
471 m_ScriptType = 0;
472 break;
473 case ST_LEVEL:
474 m_ScriptType = 1;
475 break;
476 }
477
478 UpdateData(false);
479 }
480
481 SetStatus("Ready");
482}
483
484void CScriptLevelInterface::OnSelchangeSelectedScript() { OnCloseupSelectedScript(); }
485

Callers

nothing calls this directly

Calls 1

DetermineScriptTypeFunction · 0.85

Tested by

no test coverage detected