| 453 | } |
| 454 | |
| 455 | void 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 | |
| 484 | void CScriptLevelInterface::OnSelchangeSelectedScript() { OnCloseupSelectedScript(); } |
| 485 |
nothing calls this directly
no test coverage detected